September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
24
Task/String-length/SPL/string-length.spl
Normal file
24
Task/String-length/SPL/string-length.spl
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
t = ["abc","J̲o̲s̲é̲","møøse","𝔘𝔫𝔦𝔠𝔬𝔡𝔢"]
|
||||
|
||||
> i, 1..#.size(t,1)
|
||||
? i>1, #.output()
|
||||
#.output(#.quot,t[i],#.quot," contains")
|
||||
|
||||
p = #.split(t[i])
|
||||
cn = #.size(p,1)
|
||||
s = #.str(cn,">3>")+" chars: "
|
||||
> j, 1..cn
|
||||
? j>1, s += ", "
|
||||
s += p[j]
|
||||
<
|
||||
#.output(s)
|
||||
|
||||
q = #.array(t[i])
|
||||
bn = #.size(q,1)
|
||||
s = #.str(bn,">3>")+" bytes: "
|
||||
> j, 1..bn
|
||||
? j>1, s += ", "
|
||||
s += #.str(q[j],"X2")+"h"
|
||||
<
|
||||
#.output(s)
|
||||
<
|
||||
Loading…
Add table
Add a link
Reference in a new issue