The Crystal programming language | http://crystal-lang.org | Fund Crystal's development: http://is.gd/X7PRtI | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/
https://crystal-lang.org/api/1.4.1/Enumerable.html
Note that most search and filter methods traverse an Enumerable eagerly, producing an Array as the result. For a lazy alternative refer to the Iterator and Iterable modules.
% docker run --rm -it debian bash
apt update
&& apt install curl
curl -fsSL https://crystal-lang.org/install.sh | bash
crystal
-> bash: crystal: command not found
curl -fsSL https://crystal-lang.org/install.sh | bash
Dumb, quick question: anyone know of a relatively loose date/time string parser that allows a whole lot of common patterns? Like
2022-05-02 06:07:08
and5/2/2022 6pm
and such?
you can use Time::Format
with some extra cleanup to try parse String to Time
https://carc.in/#/r/d4wj
Dumb, quick question: anyone know of a relatively loose date/time string parser that allows a whole lot of common patterns? Like
2022-05-02 06:07:08
and5/2/2022 6pm
and such?you can use
Time::Format
with some extra cleanup to try parse String toTime
https://carc.in/#/r/d4wj
Wow, thank you, that's a great start!
"foo".gsub(/o/) {|m| "x"}
.underscore
?