(beginning-of-line? scanner)
Return true if the current position is the beginning of a line.
Return true if the current position is the beginning of a line.
(check s pattern)
Returns what scan would return as its result.
Returns what scan would return as its result.
(check-until s pattern)
Returns what scan-until would return as its match.
Returns what scan-until would return as its match.
(check-until-inclusive s pattern)
Returns the string between the scanner's starting position and the end of what scan-until would match.
Returns the string between the scanner's starting position and the end of what scan-until would match.
(end? scanner)
Return true if the current position is the end of the input string.
Return true if the current position is the end of the input string.
(groups scanner)
Return the groups from the last match. Remember that the first group will be the complete match.
Return the groups from the last match. Remember that the first group will be the complete match.
(matched scanner)
Return the last matched string.
Return the last matched string.
(peek s n)
Returns the string containing the next n characters after current location.
Returns the string containing the next n characters after current location.
(position scanner)
Returns the current position in the string (an integer index).
Returns the current position in the string (an integer index).
(post-match scanner)
Return the 'post-match' of the last scan. This is the part of the input after the end of the last match.
Return the 'post-match' of the last scan. This is the part of the input after the end of the last match.
(pre-match scanner)
Return the 'pre-match' of the last scan. This is the part of the input before the beginning of the match.
Return the 'pre-match' of the last scan. This is the part of the input before the beginning of the match.
(remainder scanner)
Return what remains of the string after the scan pointer.
Return what remains of the string after the scan pointer.
(scan s pattern)
Match pattern starting at current location. On match, advances the current location and puts the matched string in result. Otherwise, just returns the same scanner, minus any previous match data.
Match pattern starting at current location. On match, advances the current location and puts the matched string in result. Otherwise, just returns the same scanner, minus any previous match data.
(scan-until s pattern)
Match pattern at any point after the current location. On match, advances the current location to the end of the match, and puts just the matching part in the match info. Otherwise, just returns the same scanner, minus any previous match data.
Match pattern at any point after the current location. On match, advances the current location to the end of the match, and puts just the matching part in the match info. Otherwise, just returns the same scanner, minus any previous match data.
(scanner source-string)
(scanner source-string pos)
(scanner source-string pos match)
Create a Scanner from a string. If the optional integer second argument is provided, it sets the scanner's current position to that index. If the optional third argument is provided, it must be a MatchInfo data structure which will be used as the scanner's latest match info.
Create a Scanner from a string. If the optional integer second argument is provided, it sets the scanner's current position to that index. If the optional third argument is provided, it must be a MatchInfo data structure which will be used as the scanner's latest match info.
(skip-to-match-start s pattern)
Match pattern at any point after the current location. On match, advances the current location to the beginning of the match, so that a subsequent scan with the same pattern will succeed. Matched pattern is stored in the result. Otherwise, just returns the same scanner, minus any previous match data.
Match pattern at any point after the current location. On match, advances the current location to the beginning of the match, so that a subsequent scan with the same pattern will succeed. Matched pattern is stored in the result. Otherwise, just returns the same scanner, minus any previous match data.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close