Substring/Top and tail: Difference between revisions

m
Line 1,062:
 
=={{header|Swift}}==
Swift strings are native Unicode strings and do not index through the code points. Swift's <code>String.Index</code> refers to true Unicode characters. Swift standard library has generic functionality that not only works onwith strings, but also onwith any type that conforms to relevant protocols. The first method presented here uses generic functions from Swift standard library:
 
<lang swift>let txt = "0123456789"
println(dropFirst(txt))
Anonymous user