[Gambas-user] Keyboard function skipped?

Daniel daniel.campos at ...338...
Thu Jun 10 18:39:52 CEST 2004


El mié, 09-06-2004 a las 21:13, Benoit Minisini escribió:
> On Wednesday 09 June 2004 18:27, danielcampos at ...282... wrote:
> > VB has two functions : Lenb() is byte lenght, Len() is characters lenght,
> > may be Gambas needs something like this!
> >
> > Regards,
> >
> > Daniel Campos
> >
> 
> There is no assumption on the charset used by the system, contrary to Windows. 
> So the function might be Len(String, Charset).

Well, once you're using iconv, you can use:

int iconv_strlen ( string str [, string charset]);

To get that character length, and

int iconv_strpos ( string haystack, string needle, int offset [, string
charset])

To get the position of a character

> 
> But the string functions of the language were only intended to work with 
> ASCII, not with any other charset. So some others functions are needed. Maybe 
> a String class with static functions.
> 

Using the two functions listed, I don't see the need of more stuff, you
know the length of a string and you can know were any character is
placed in that string...

Regards,

Daniel Campos






More information about the User mailing list