Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
7
Task/String-length/Tcl/string-length-2.tcl
Normal file
7
Task/String-length/Tcl/string-length-2.tcl
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
set s1 "hello, world"
|
||||
set s2 "\u304A\u306F\u3088\u3046"
|
||||
set enc utf-8
|
||||
puts [format "length of \"%s\" in bytes is %d" \
|
||||
$s1 [string length [encoding convertto $enc $s1]]]
|
||||
puts [format "length of \"%s\" in bytes is %d" \
|
||||
$s2 [string length [encoding convertto $enc $s2]]]
|
||||
Loading…
Add table
Add a link
Reference in a new issue