diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-12-04 14:25:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 14:25:19 +0100 |
commit | 0c5c9b1a46dc0078057e40f2e022bcb75b6fe842 (patch) | |
tree | 8cef8f264905ea4ecd03455459e0f8a3c8fe1274 /Northstar.CustomServers/mod/scripts | |
parent | bdb73b1fd5ddd1899adae528ec64b3077b918a61 (diff) | |
download | NorthstarMods-0c5c9b1a46dc0078057e40f2e022bcb75b6fe842.tar.gz NorthstarMods-0c5c9b1a46dc0078057e40f2e022bcb75b6fe842.zip |
Add a doc comment to `StringReplace` (#748)
This is an initial test to get formatting etc agreed upon to then
build on this further
Diffstat (limited to 'Northstar.CustomServers/mod/scripts')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut b/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut index 9e762985..a97185b5 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut @@ -348,6 +348,14 @@ string function GetMapDisplayDesc( string mapname ) return "#" + mapname + "_CLASSIC_DESC" } +/// Sends a string message to player +/// * `baseString` - The input string to search through +/// * `searchString` - Find this substring... +/// * `replaceString` - ...and replace with this substring +/// * `replaceAll` - Whether to replace all occurences or just the first +/// * `caseInsensitive` - Whether to consider casing (upper/lower) +/// +/// Returns the updated string string function StringReplace( string baseString, string searchString, string replaceString, bool replaceAll = false, bool caseInsensitive = false ) { bool loopedOnce = false |