Stream.takeUntil

This commit is contained in:
2022-12-11 21:51:50 +00:00
parent 0a38f65991
commit d357e3705d

View File

@@ -201,6 +201,10 @@ class Stream {
return takeChars(firstIndex);
}
public function takeUntil(s:String, allowEOF:Bool = false):Option<String> {
return takeUntilOneOf([s], allowEOF);
}
public function takeUntilAndDrop(s:String, allowEOF:Bool = false):Option<String> {
var idx = content.indexOf(s);