From 1612beedfe610461d4bfdded0afee9aefaed667b Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Tue, 17 Oct 2023 17:14:47 +0200 Subject: [PATCH 1/2] Add a doc comment to `StringReplace` This is an initial test to get formatting etc agreed upon to then build on this further --- .../mod/scripts/vscripts/sh_utility_all.gnut | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut b/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut index 9e7629858..54e9e0696 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut @@ -348,6 +348,16 @@ 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 From c3eba087ed7aa4fe5d8d6faa5452989c42815e46 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Mon, 30 Oct 2023 20:52:08 +0100 Subject: [PATCH 2/2] style: Remove comment decorators --- .../mod/scripts/vscripts/sh_utility_all.gnut | 2 -- 1 file changed, 2 deletions(-) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut b/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut index 54e9e0696..a97185b51 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut @@ -348,7 +348,6 @@ 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... @@ -357,7 +356,6 @@ string function GetMapDisplayDesc( string mapname ) /// * `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