Skip to content

Commit

Permalink
Stream.linePrefix
Browse files Browse the repository at this point in the history
  • Loading branch information
NQNStudios committed Dec 12, 2024
1 parent 38773bc commit a54a5a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/kiss/Stream.hx
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,15 @@ class Stream {
return _currentTab;
}

public var linePrefix = '';

public function takeChars(count:Int):Option<String> {
if (count > content.length)
return None;
var toReturn = content.substr(0, count);
if (linePrefix.length > 0) {
toReturn = toReturn.replace('\n{linePrefix}', '\n');
}
dropChars(count, true);
return Some(toReturn);
}
Expand Down

0 comments on commit a54a5a0

Please sign in to comment.