Internals: Use magic string for warnMore so lock-free.

This commit is contained in:
Wilson Snyder
2025-05-10 18:06:33 -04:00
parent 680236b03e
commit fe4ad7de64
5 changed files with 32 additions and 15 deletions
+2
View File
@@ -126,6 +126,8 @@ public:
static string::size_type leadingWhitespaceCount(const string& str);
// Return double by parsing string
static double parseDouble(const string& str, bool* successp);
// Replace substring. Often replaceWord is more appropriate.
static string replaceSubstr(const string& str, const string& from, const string& to);
// Replace all occurrences of the word 'from' in 'str' with 'to'. A word is considered
// to be a consecutive sequence of the characters [a-zA-Z0-9_]. Sub-words are not replaced.
// e.g.: replaceWords("one apple bad_apple", "apple", "banana") -> "one banana bad_apple"