From 1146920bc9ed9bef2b5bb91b3cdec4700eb09881 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 8 Jun 2022 11:54:27 -0700 Subject: Add smoke test for language server. (#2266) --- source/core/slang-string-util.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/core/slang-string-util.h') 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. */ -- cgit v1.2.3