string.SetChar
From Garry's Mod
Contents |
Description
Sets the character at the specific index of the string.
Arguments
string InputString
The input string
Arguments
number Index
The character index, 1 is the first from left.
Arguments
string ReplacementChar
String to replace with.
Returns
ModifiedString
Examples
Example
Demonstrates the use of SetChar
local str = "Apples" MsgN(string.SetChar(str, 3, "g"))
Output:
"Apgles"