Logo FS-Skia-UI

Parsing Module

Functions and values

Function or value Description

matchLines pattern lines

Full Usage: matchLines pattern lines

Parameters:
    pattern : string
    lines : string seq

Returns: (int * Match) seq

Regex line-grammar helper: compile `pattern` once and apply it to each line, yielding the zero-based line index paired with the successful match.

pattern : string
lines : string seq
Returns: (int * Match) seq

readJson text

Full Usage: readJson text

Parameters:
    text : string

Returns: Result<'T, string>
Type parameters: 'T

Typed JSON read (System.Text.Json + FSharp.SystemTextJson, so F# records and unions deserialize). `Ok value` on success; `Error message` on failure.

text : string
Returns: Result<'T, string>

readYaml text

Full Usage: readYaml text

Parameters:
    text : string

Returns: Result<'T, string>
Type parameters: 'T

Typed YAML read (YamlDotNet). `Ok value` on a successful deserialization; `Error message` carries the deserializer's message on failure.

text : string
Returns: Result<'T, string>

Type something to start searching.