core-ext
Version, currently 0.1.24 versions
- 0.3.0latestSep 20, 2018
- 0.2.0not indexedSep 20, 2018
- 0.1.3not indexedSep 20, 2018
- 0.1.2not indexedSep 20, 2018
github.com/maiha/core-ext.cr
Personal but versatile core class extensions for Crystal
Nothing has been indexed for 0.1.2 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
core-ext:
github: maiha/core-ext.cr
version: ~> 0.1.2Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.2. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
core-ext.cr 
Personal but versatile core class extensions for Crystal.
- crystal: 0.26.1
BREAKING CHANGES
- 0.3.0: Removed
Time.parse(String), usepretty.cr
API
- Enumerable#grep(T) : Array(T)
- String#first?(Regex) : String?
- String?#any? : Bool
- Time::Span.parse(String) : Time::Span
Usage
require "core-ext"
Enumerable#grep(T)
a = [1, nil, "a"] # Array(Int32 | String | Nil)
a.grep(String) # => ["a"] (Array(String))
String#first?(Regex)
"a:12".first?(/(\d+)/) # => "12"
String?#any?
nil.any? # => false
"".any? # => false
" ".any? # => true
Time::Span.parse(String)
Time::Span.parse("01:02:03") # => Time::Span.new(1, 2, 3)
Time::Span.parse("5.01:02:03") # => Time::Span.new(5, 1, 2, 3)
Time::Span.parse("5.01:02:03.010") # => Time::Span.new(5, 1, 2, 3, 10)
Installation
Add this to your application's shard.yml:
dependencies:
core-ext:
github: maiha/core-ext.cr
version: 0.3.0
Development
make
Contributing
- Fork it ( https://github.com/maiha/core-ext.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- maiha maiha - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.2- Tagged
- Sep 20, 2018
- Commit
0403df19ed79- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/maiha/core-ext.cr
Metadata
- Created
- Aug 16, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 4