[Gambas-user] LEN()

Simonart Dominique simonart.dominique at ...11...
Sat Dec 12 17:20:23 CET 2009


Hi,

Len() function is based on one-byte character, but some 
characters need 2 bytes code, like the german's you mentionned.

Use the String class methods and all will works as you expected

HTH
Dominique Simonart

Norarg a écrit :
> hi,
> 
> I get a bit strange results from the LEN()-function.
> If there are characters like the German Umlaute in the string (äöüÄÖÜß),
> the result just does not fit. It seems to me, that LEN("ä") gives back 2 
> instead of 1,
> is this possible?
> 
> I fill up a string with spaces for a more (or less) formatted simple 
> text-file,
> the columns separated with "|".
> 
> Using Tabs (chr(9)) gives me more work, and it would not solve this 
> problem, because I still would have to ask for the string-lenght.
> 
> Any ideas?
> 
> Thanks in advance
> regards
> norarg
> 
> ------------------------------------------------------------------------------
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 







More information about the User mailing list