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

ReplaceCharAt

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

String.ReplaceCharAt(int index, char newChar)
Changes the character at INDEX in the string to NEWCHAR.

INDEX is the character index into the string (where 0 is the first character, and the last allowable value is the string's Length minus 1).

NOTE: The new string is returned from this function; it does NOT modify the original string.

Example:

String mystring = "Hello";
String changed = mystring.ReplaceCharAt(2, 'm');
Display("Old: %s, new: %s", newstring, changed);
will display "Old: Hello, new: Hemlo".

See Also: String.Chars, String.Replace


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