Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Reverse-a-string/Dyalect/reverse-a-string.dyalect
Normal file
12
Task/Reverse-a-string/Dyalect/reverse-a-string.dyalect
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
let str = "asdf"
|
||||
|
||||
func String.Reverse() {
|
||||
var cs = []
|
||||
let len = this.Length()
|
||||
for n in 1..len {
|
||||
cs.Add(this[len - n])
|
||||
}
|
||||
String(values: cs)
|
||||
}
|
||||
|
||||
str.Reverse()
|
||||
Loading…
Add table
Add a link
Reference in a new issue