Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
1
Task/String-length/ArkScript/string-length.ark
Normal file
1
Task/String-length/ArkScript/string-length.ark
Normal file
|
|
@ -0,0 +1 @@
|
|||
(print (len "åéèàâêç"))
|
||||
2
Task/String-length/DuckDB/string-length.duckdb
Normal file
2
Task/String-length/DuckDB/string-length.duckdb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
select s, length(s), strlen(s) as '# bytes' from
|
||||
(select unnest(['J̲o̲s̲é̲', '𝔘𝔫𝔦𝔠𝔬𝔡𝔢']) as s);
|
||||
17
Task/String-length/FutureBasic/string-length.basic
Normal file
17
Task/String-length/FutureBasic/string-length.basic
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
CFStringRef s
|
||||
|
||||
s = @"møøse"
|
||||
printf @"\"%@\"",s
|
||||
print @"character length:",len(s)
|
||||
print @"unicode length:",,len(s,_kLenUnicode)
|
||||
print @"byte length UTF8:",len(s,_kLenBytesUTF8)
|
||||
print @"byte length UTF16:",len(s,_kLenBytesUTF16)
|
||||
|
||||
print
|
||||
|
||||
s = @"𝔘𝔫𝔦𝔠𝔬𝔡𝔢"
|
||||
printf @"\"%@\"",s
|
||||
print @"character length:",len(s)
|
||||
print @"unicode length:",,len(s,_kLenUnicode)
|
||||
print @"byte length UTF8:",len(s,_kLenBytesUTF8)
|
||||
print @"byte length UTF16:",len(s,_kLenBytesUTF16)
|
||||
12
Task/String-length/Pluto/string-length.pluto
Normal file
12
Task/String-length/Pluto/string-length.pluto
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
require "gchar"
|
||||
local fmt = require "fmt"
|
||||
|
||||
local moose = "møøse"
|
||||
local unicode = "𝔘𝔫𝔦𝔠𝔬𝔡𝔢"
|
||||
local jose = "J\u{332}o\u{332}s\u{332}e\u{301}\u{332}"
|
||||
|
||||
local f = "%5s %7s %5s"
|
||||
fmt.print("Strings : " .. f, moose, unicode, jose)
|
||||
fmt.print("\nBytes : " .. f, #moose, #unicode, #jose)
|
||||
fmt.print("\nCodepoints: " .. f, utf8.len(moose), utf8.len(unicode), utf8.len(jose))
|
||||
fmt.print("\nGraphemes : " .. f, gchar.of(moose):len(), gchar.of(unicode):len(), gchar.of(jose):len())
|
||||
6
Task/String-length/TAV/string-length.tav
Normal file
6
Task/String-length/TAV/string-length.tav
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
s =: "𝔘𝔫𝔦𝔠𝔬𝔡𝔢"
|
||||
print (quote s), s.Count, s.Bytes
|
||||
s =: "José&e10;"
|
||||
print (quote s), s.Count, s.Bytes
|
||||
s =: "J̲o̲s̲é̲"
|
||||
print (quote s), s.Count, s.Bytes
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
System.print("møøse".bytes.count)
|
||||
System.print("𝔘𝔫𝔦𝔠𝔬𝔡𝔢".bytes.count)
|
||||
System.print("J̲o̲s̲é̲".bytes.count)
|
||||
var jose = "J\u0332o\u0332s\u0332e\u0301\u0332"
|
||||
System.print(jose.bytes.count)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
System.print("møøse".count)
|
||||
System.print("𝔘𝔫𝔦𝔠𝔬𝔡𝔢".count)
|
||||
System.print("J̲o̲s̲é̲".count)
|
||||
var jose = "J\u0332o\u0332s\u0332e\u0301\u0332"
|
||||
System.print(jose.count)
|
||||
|
|
|
|||
|
|
@ -2,4 +2,5 @@ import "./upc" for Graphemes
|
|||
|
||||
System.print(Graphemes.clusterCount("møøse"))
|
||||
System.print(Graphemes.clusterCount("𝔘𝔫𝔦𝔠𝔬𝔡𝔢"))
|
||||
System.print(Graphemes.clusterCount("J̲o̲s̲é̲"))
|
||||
var jose = "J\u0332o\u0332s\u0332e\u0301\u0332"
|
||||
System.print(Graphemes.clusterCount(jose))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue