Counting number of characters

Hi,
does anyone can help ? I have difficulties of counting number of characters in a field…what syntax should I use?

thx

Len(clip(your field))

1 Like

I would do LEN(CLIP(LEFT(your field)))

yes it depends on your definition of “characters” - spaces are characters too! But probably fair to remove trailing (and perhaps leading) spaces as suggested.

1 Like

Or invest (less than 100$) in StringTheory from Capesoft. Has all the string features and functions you can think of - you will not regret it.

… No, I have no shares in Cape Soft …

1 Like

This may help you…
Length#=0
LOOP i#=1 TO LEN(CLIP(LEFT(YourField)))
IF ISALPHA(YourField[i#]) OR NUMERIC(YourField[i#]) THEN Length#+=1.
END

1 Like