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

Substring

String.Substring(int index, int length)
Returns part of the string, starting from character index and length characters long.

index is the initial character index, where 0 is the first character and (Length - 1) is the last. length specifies how many characters to retrieve.

Example:

String mystring = "Hello World!";
String substring = mystring.Substring(3, 5);
Display("Original: %s, Substring: %s", mystring, substring);
will display "Original: Hello World!, Substring: lo Wo".

See Also: String.Append, String.Chars


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