Skip to content

Commit

Permalink
Add a seek method
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Sep 27, 2024
1 parent 42c37ae commit 6f7c205
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/gossamer-core.scala
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ extension [TextType: Textual](text: TextType)

def contains(substring: into Text): Boolean = TextType.indexOf(text, substring).present
def contains(char: Char): Boolean = TextType.indexOf(text, char.show).present
def seek(substring: into Text): Optional[Ordinal] = TextType.indexOf(text, substring)

inline def trim: TextType =
val start = text.where(!_.isWhitespace).or(Ult.of(text))
Expand Down

0 comments on commit 6f7c205

Please sign in to comment.