From 0c5c9b1a46dc0078057e40f2e022bcb75b6fe842 Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Mon, 4 Dec 2023 14:25:19 +0100 Subject: Add a doc comment to `StringReplace` (#748) This is an initial test to get formatting etc agreed upon to then build on this further --- Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut') diff --git a/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut b/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut index 9e7629858..a97185b51 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 -- cgit v1.2.3