Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

9 Commits

Repository files navigation

SwiftRubyStyle

Write Ruby style code in Swift.

puts

puts("hello") // hello

times

3.times{puts("hi")}
// hi
// hi
// hi
// or
5.times{ i inputs(i)}
// 0
// 1
// 2
// 3
// 4

String

// count
["a"].count // 1
["a","b"].size // 2
["a","b","c"].length // 3
// append
"hello " << "world" // hello world
// *
"a "*3 // a a a

Array

// Hello
// Swift
// Ruby
// *n
["a"]*3 // a a a
["A","B"]+["C"] // A B C

Dictionary

// each
_ =["A":"Hello A","B":"Hello B"].each{(k, v)inputs(k)puts(v)}

About

Write Ruby style code in Swift.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages