Click to See Complete Forum and Search --> : strings


batsheva
May 21st, 2001, 10:14 AM
I am reading information from a stored procedure.
A field that is returned contains either spaces or a string. what i would like to do is if the string contains characters then trim it and if contains just white space then ingnore it. how can i check if the string is just blank spaces?

Thanks!

Iouri
May 21st, 2001, 10:21 AM
trim it and check the length.

if len(trim(MyString)) = 0 then ' ignore it

Iouri Boutchkine
iouri@hotsheet.com

Iouri
May 21st, 2001, 10:23 AM
Also you must check if it has spaces

for i = 0 to len(MyString)

'check here if each char is not a space

next i

Iouri Boutchkine
iouri@hotsheet.com