This module contains various string utility routines that are uncommonly used in comparison to strutils.
proc expandTabs(s: string; tabSize: int = 8): string {...}{.noSideEffect, procvar, raises: [], tags: [].}
proc partition(s: string; sep: string; right: bool = false): (string, string, string) {...}{. noSideEffect, procvar, raises: [], tags: [].}
Split the string at the first or last occurrence of sep into a 3-tuple
Returns a 3 string tuple of (beforeSep, sep, afterSep) or (s, "", "") if sep is not found and right is false or ("", "", s) if sep is not found and right is true
proc rpartition(s: string; sep: string): (string, string, string) {...}{.noSideEffect, procvar, raises: [], tags: [].}
Split the string at the last occurrence of sep into a 3-tuple
Returns a 3 string tuple of (beforeSep, sep, afterSep) or ("", "", s) if sep is not found
© 2006–2018 Andreas Rumpf
Licensed under the MIT License.
https://nim-lang.org/docs/strmisc.html