📂 from /home/chedong/.local/share/rdoc
Similar to a StringScanner, but with extra functionality needed to tokenize CSS while preserving the original text.
| Use Case | Command | Description |
|---|---|---|
| Initialize scanner | Crass::Scanner.new(string) | Create a new scanner with a string |
| Get current character | current | Returns the current character |
| Scan a pattern | scan(pattern) | Attempt to match pattern from current position |
| Check end of string | eos? | Returns true if at end of string |
| Get position | pos | Returns current position |
| Mark position | mark | Save current position for later rollback |
| Reset to mark | reset | Go back to last marked position |
| Consume next n chars | consume(n) | Advance by n characters |
| Get rest of string | consume_rest | Advance to end and return remaining string |
| Peek at next chars | peek(n) | Look ahead n characters without consuming |
| Scan until pattern | scan_until(pattern) | Advance until pattern matches, return text |
newconsumeconsume_restcurrenteos?markmarkedmarkerpeekposreconsumeresetscanscan_untilstringmarker (attr_accessor)pos (attr_accessor)current (attr_reader)string (attr_reader)Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-31 14:37 @216.73.217.152
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format