summaryrefslogtreecommitdiffstats
path: root/source/core/slang-string-util.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-06-08 11:54:27 -0700
committerGitHub <noreply@github.com>2022-06-08 11:54:27 -0700
commit1146920bc9ed9bef2b5bb91b3cdec4700eb09881 (patch)
treee8d94a3aad0d204f7c33f38b42b9e03d862cc3c8 /source/core/slang-string-util.h
parentff2ae7e0c1b48fa222f14dc84f15d0178ed056a1 (diff)
Add smoke test for language server. (#2266)
Diffstat (limited to 'source/core/slang-string-util.h')
-rw-r--r--source/core/slang-string-util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/core/slang-string-util.h b/source/core/slang-string-util.h
index 03f503ed2..b7576da1d 100644
--- a/source/core/slang-string-util.h
+++ b/source/core/slang-string-util.h
@@ -109,6 +109,11 @@ struct StringUtil
/// Convert into int64_t. Returns SLANG_OK on success.
static SlangResult parseInt64(const UnownedStringSlice& text, int64_t& out);
+
+ /// Parse an integer from text starting at pos until the end or the first non-digit char.
+ /// Modifies pos to the position where parsing ends.
+ /// Returns parsed integer.
+ static int parseIntAndAdvancePos(UnownedStringSlice text, Index& pos);
};
/* A helper class that allows parsing of lines from text with iteration. Uses StringUtil::extractLine for the actual underlying implementation. */