Jump to content

Split a character string based on change of character: Difference between revisions

m
Line 1,043:
=={{header|Dyalect}}==
 
<lang dyalect>func String.smartSplitSmartSplit() {
var c
var str = ""
var last = this.lenLength() - 1
 
for n in 0..last {
if c && this[n] != c {
Line 1,055:
str += c
}
 
str
}
 
print("gHHH5YY++///\\".smartSplitSmartSplit())</lang>
 
{{out}}
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.