A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/JuliaData/Parsers.jl below:

JuliaData/Parsers.jl: fast parsing machinery for basic types in Julia

A collection of type parsers and utilities for Julia.

Installation: at the Julia REPL, import Pkg; Pkg.add("Parsers")

Maintenance: Parsers is maintained collectively by the JuliaData collaborators. Responsiveness to pull requests and issues can vary, depending on the availability of key collaborators.

using Parsers

# basic int/float parsing
x = Parsers.parse(Int, "101")
y = Parsers.parse(Float64, "101.101")

# use comma as decimal
y2 = Parsers.parse(Float64, "101,101", Parsers.Options(decimal=','))

# Bool parsing
z = Parsers.parse(Bool, "true")

# Date/DateTime parsing
using Dates
a = Parsers.parse(Date, "2018-01-01")

# custom dateformat
b = Parsers.parse(Date, "01/20/2018", Parsers.Options(dateformat="mm/dd/yyyy"))

# will throw on invalid values
Parsers.parse(Int, "abc")

# tryparse will return `nothing` on invalid values
y = Parsers.tryparse(Int, "abc")

Read through the docs of the following types/functions for more information on using advanced Parsers machinery:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4