No no with all due respect that is just plain wrong
You've just chosen to write it a long way

$stringwithoutTAB="text"
$stringwithTAB="text "

len($stringwithTAB)-len($stringwithTAB) = 1