spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links
* AGS Manual
  * Scripting
    * String functions

Chars property

(Formerly known as global function StrGetCharAt, which is now obsolete)

readonly char String.Chars[position];
Returns the character at POSITION within the string.

POSITION is the character index (where 0 is the first character, and the last allowable value is the Length minus 1).

If POSITION is outside the string, this function returns 0.

NOTE: The Chars array is read-only. If you want to change one of the characters in the string, use String.ReplaceCharAt.

Example:

String text = "This is my string.";
Display("The 4th character is: %c", text.Chars[3]);
will display "The 4th character is: s".

See Also: String.Length, String.ReplaceCharAt


User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.