summaryrefslogtreecommitdiffstats
path: root/source/core/slang-semantic-version.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/slang-semantic-version.cpp')
-rw-r--r--source/core/slang-semantic-version.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/core/slang-semantic-version.cpp b/source/core/slang-semantic-version.cpp
index 93536e007..7f603fd9c 100644
--- a/source/core/slang-semantic-version.cpp
+++ b/source/core/slang-semantic-version.cpp
@@ -7,13 +7,13 @@
namespace Slang {
-SlangResult SemanticVersion::parse(const UnownedStringSlice& value, SemanticVersion& outVersion)
+SlangResult SemanticVersion::parse(const UnownedStringSlice& value, char separatorChar, SemanticVersion& outVersion)
{
outVersion.reset();
UnownedStringSlice slices[3];
Index splitCount;
- SLANG_RETURN_ON_FAIL(StringUtil::split(value, '.', 3, slices, splitCount));
+ SLANG_RETURN_ON_FAIL(StringUtil::split(value, separatorChar, 3, slices, splitCount));
if (splitCount <= 0)
{
return SLANG_FAIL;
@@ -38,6 +38,11 @@ SlangResult SemanticVersion::parse(const UnownedStringSlice& value, SemanticVers
return SLANG_OK;
}
+SlangResult SemanticVersion::parse(const UnownedStringSlice& value, SemanticVersion& outVersion)
+{
+ return parse(value, '.', outVersion);
+}
+
void SemanticVersion::append(StringBuilder& buf) const
{
buf << Int32(m_major) << "." << Int32(m_minor);