Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Ubel on Sat 24/09/2005 14:23:32

Title: How to store the amount of characters from string to int? [SOLVED]
Post by: Ubel on Sat 24/09/2005 14:23:32
For example:

"string text;" has the value of "Sample text".

This text has 11 characters. How could I store the number into an int. So that

int textnumber;

would have the value 11.
Title: Re: How to store the amount of characters from string to int?
Post by: Ashen on Sat 24/09/2005 14:31:21
textnumber = StrLen (text);

or

textnumber = text.Length;    (newer 2.71 betas)
Title: Re: How to store the amount of characters from string to int?
Post by: Ubel on Sat 24/09/2005 14:40:17
What, is it that simple? I had no idea. Thanks!