在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:JuliaData/Parsers.jl开源软件地址:https://github.com/JuliaData/Parsers.jl开源编程语言:Julia 100.0%开源软件介绍:Parsers.jlA collection of type parsers and utilities for Julia. Installation: at the Julia REPL, Maintenance: Parsers is maintained collectively by the JuliaData collaborators. Responsiveness to pull requests and issues can vary, depending on the availability of key collaborators. Basic Usageusing 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") Additional usageRead through the docs of the following types/functions for more information on using advanced Parsers machinery:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论