in reply to Re: Handling undefined string content
in thread Handling undefined string content
if (length(substr($var, index($var, ' '), rindex($var, ' ')+1)) == len +gth($var) { Dosomething(); }
Update: Ah good. He saw it, the
length x space works, the tr solution does not. tr
returns the number of matches to a scalar. So if you had
10 spaces in your string, you would get the number 10.
And of course these would only we applicable to space answers, not on any
whitespace.
|
|---|