summaryrefslogtreecommitdiffstats
path: root/source/core/slang-string-util.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2021-02-23 12:36:46 -0500
committerGitHub <noreply@github.com>2021-02-23 12:36:46 -0500
commit55a5ccc559b34b8d2eb9c7b7a2d9efbae40619c2 (patch)
tree105e60200bc4f6ac13a1845b448886d777a7398a /source/core/slang-string-util.h
parent4bf01b04cb6bf1df8d4fb2ec5eee0a912ec679dc (diff)
Documentation markup extraction (#1724)
* #include an absolute path didn't work - because paths were taken to always be relative. * WIP extracting source documentation. * WIP doc extraction. * More stuff around doc markup extraction. * More WIP around doc extraction. * Fix some indexing issues. * Initial doc extraction working. * Renaming of types in markup extraction process. * Extracting markup content. Removing indenting. Other fixes and improvements around document tools. * WIP support for documentation system. * Remove some commented out sections. * Remove some comments that no longer apply. * Improvements around SourceFile - such that more granularity around line ops. Made some functionality explicitly work without source. Improved Doc types nameing.
Diffstat (limited to 'source/core/slang-string-util.h')
-rw-r--r--source/core/slang-string-util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/core/slang-string-util.h b/source/core/slang-string-util.h
index dade8a61d..4672fa1d0 100644
--- a/source/core/slang-string-util.h
+++ b/source/core/slang-string-util.h
@@ -88,6 +88,9 @@ struct StringUtil
/// Given text, splits into lines stored in outLines. NOTE! That lines is only valid as long as textIn remains valid
static void calcLines(const UnownedStringSlice& textIn, List<UnownedStringSlice>& lines);
+ /// Given a line that may contain cr/lf, returns the the a slice that doesn't have trailing cr/lf
+ static UnownedStringSlice trimEndOfLine(const UnownedStringSlice& slice);
+
/// Equal if the lines are equal (in effect a way to ignore differences in line breaks)
static bool areLinesEqual(const UnownedStringSlice& a, const UnownedStringSlice& b);