summaryrefslogtreecommitdiff
path: root/source/core/slang-string-util.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/slang-string-util.h')
-rw-r--r--source/core/slang-string-util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/core/slang-string-util.h b/source/core/slang-string-util.h
index 0579dd057..3547fd97c 100644
--- a/source/core/slang-string-util.h
+++ b/source/core/slang-string-util.h
@@ -63,6 +63,10 @@ struct StringUtil
/// Returns an empty string if blob is nullptr
static String getString(ISlangBlob* blob);
+ /// Given a string or slice, replaces all instances of fromChar with toChar
+ static String calcCharReplaced(const UnownedStringSlice& slice, char fromChar, char toChar);
+ static String calcCharReplaced(const String& string, char fromChar, char toChar);
+
/// Create a blob from a string
static ComPtr<ISlangBlob> createStringBlob(const String& string);
};