RubySwift is making Swift more Ruby way.
5.times {
println("Hey! You look really like Ruby")
}5.upto(10) {
println($0)
}
=>
5
6
7
8
9
103.days.ago // => 2014-07-21 01:06:03 +0000"HELLO".capitalized
=> Hello"HELLO".downcase
=> hello"hello".upcase
=> HELLOFunction | ---- | ------------- ago|
Function | ---- | ------------- capitalized| downcase| upcase|
Function | ---- | ------------- times| upto|
- split(Regexp)
- scan(Regexp)
- match(Regexp)
- strip
- split(“”)
- reverse
- to_i
- to_s
- to_str
- sub(“string”, “replace”)
- sub(Regexp, “replace”)
- gsub(“string”, “replace”)
- gsub(Regexp, “replace”)
- str[Regexp]
- downto
- to_s
- abs
- ceil
- floor
...
...