Skip to content

Commit

Permalink
tryDropUntil
Browse files Browse the repository at this point in the history
  • Loading branch information
NQNStudios committed Dec 11, 2024
1 parent 70464e4 commit 1ae2eaa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/kiss/Stream.hx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ class Stream {
dropChars(content.indexOf(s), false);
}

public function tryDropUntil(s:String) {
if (content.indexOf(s) != -1) {
dropUntil(s);
}
}

public function dropWhitespace() {
var trimmed = content.ltrim();
dropChars(content.length - trimmed.length, false);
Expand Down

0 comments on commit 1ae2eaa

Please sign in to comment.