Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hsugawa8651/simplestringscanners.jl
Julia package for lexical scanning operations on a string
https://github.com/hsugawa8651/simplestringscanners.jl
julia julia-language julialang parsing string
Last synced: about 1 month ago
JSON representation
Julia package for lexical scanning operations on a string
- Host: GitHub
- URL: https://github.com/hsugawa8651/simplestringscanners.jl
- Owner: hsugawa8651
- License: mit
- Created: 2024-03-16T06:18:33.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-06T07:57:53.000Z (6 months ago)
- Last Synced: 2024-10-12T22:24:23.568Z (about 1 month ago)
- Topics: julia, julia-language, julialang, parsing, string
- Language: Julia
- Homepage: https://hsugawa8651.github.io/SimpleStringScanners.jl/
- Size: 134 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SimpleStringScanners
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://hsugawa8651.github.io/SimpleStringScanners.jl/stable/)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://hsugawa8651.github.io/SimpleStringScanners.jl/dev/)
[![Build Status](https://github.com/hsugawa8651/SimpleStringScanners.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/hsugawa8651/SimpleStringScanners.jl/actions/workflows/CI.yml?query=branch%3Amain)Helper for scanning fixed-length substring and parsing.
# Quick start
```julia
julia> using SimpleStringScannersjulia> scanner=SimpleStringScanner(" 2 3d-1");
julia> advance!(scanner,3)
" 2"julia> advance!(scanner,5)
" 3d-1"
``````julia
julia> using SimpleStringScannersjulia> scanner=SimpleStringScanner(" 2 3d-1");
julia> tryparse1Int64(scanner,3)
2julia> tryparse1Float64(scanner,5)
0.3
``````julia
julia> using SimpleStringScannersjulia> scanner=SimpleStringScanner(" 12 34");
julia> tryparse1Int64(scanner, r"\d+")
12julia> tryparse1Int64(scanner, r"\d+")
34
```