June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -0,0 +1 @@
~"Hello, World!"

View file

@ -0,0 +1,8 @@
PRINT "Bytelen of 'hello': ", LEN("hello")
PRINT "Charlen of 'hello': ", ULEN("hello")
PRINT "Bytelen of 'møøse': ", LEN("møøse")
PRINT "Charlen of 'møøse': ", ULEN("møøse")
PRINT "Bytelen of '𝔘𝔫𝔦𝔠𝔬𝔡𝔢': ", LEN("𝔘𝔫𝔦𝔠𝔬𝔡𝔢")
PRINT "Charlen of '𝔘𝔫𝔦𝔠𝔬𝔡𝔢': ", ULEN("𝔘𝔫𝔦𝔠𝔬𝔡𝔢")

View file

@ -0,0 +1,2 @@
U8 *string = "Hello, world!";
Print("%d\n", StrLen(string));

View file

@ -0,0 +1,21 @@
let
str='AöЖ€𝄞'
,countofcodeunits=str.length // 6
,cparr=[...str],
,countofcodepoints=cparr.length; // 5
{ let
count=0
for(let codepoint of str)
count++
countofcodepoints=count // 5
}
{ let
count=0,
it=str[Symbol.iterator]()
while(!it.next().done)
count++
countofcodepoints=count // 5
}
{ cparr=Array.from(str)
countofcodepoints=cparr.length // 5
}

View file

@ -0,0 +1,4 @@
fn main() {
let s = "文字化け"; // UTF-8
println!("Byte Length: {}", s.len());
}

View file

@ -0,0 +1,4 @@
fn main() {
let s = "文字化け"; // UTF-8
println!("Character length: {}", s.chars().count());
}

View file

@ -1,4 +0,0 @@
fn main(){
let len = String::from("Hello world").len();
println!("{}", len);
}