Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,2 +0,0 @@
Str : String := "Hello World";
Length : constant Natural := Str'Size / 8;

View file

@ -1,6 +0,0 @@
Latin_1_Str : String := "Hello World";
UCS_16_Str : Wide_String := "Hello World";
Unicode_Str : Wide_Wide_String := "Hello World";
Latin_1_Length : constant Natural := Latin_1_Str'Length;
UCS_16_Length : constant Natural := UCS_16_Str'Length;
Unicode_Length : constant Natural := Unicode_Str'Length;

View file

@ -1 +0,0 @@
FUNCTION BYTE-LENGTH(str)

View file

@ -1 +0,0 @@
LENGTH OF str

View file

@ -1 +0,0 @@
FUNCTION LENGTH-AN(str)

View file

@ -1 +0,0 @@
FUNCTION LENGTH(str)

View file

@ -1,6 +1,6 @@
import extensions;
public program()
public Program()
{
var s := "Hello, world!"; // UTF-8 literal
var ws := "Привет мир!"w; // UTF-16 literal

View file

@ -1,6 +1,6 @@
import extensions;
public program()
public Program()
{
var s := "Hello, world!"; // UTF-8 literal
var ws := "Привет мир!"w; // UTF-16 literal

View file

@ -1,2 +0,0 @@
(length "hello")
;; => 5

View file

@ -1,2 +0,0 @@
(string-bytes "\u1D518\u1D52B\u1D526")
;; => 12

View file

@ -1,7 +0,0 @@
(let ((str (apply 'string
(mapcar (lambda (c) (decode-char 'ucs c))
'(#x1112 #x1161 #x11ab #x1100 #x1173 #x11af)))))
(list (length str)
(string-bytes str)
(string-width str)))
;; => (6 18 4) ;; in emacs 23 up

View file

@ -1 +0,0 @@
print(1,length("Hello World"))

View file

@ -15,3 +15,5 @@ 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)
HandleEvents

View file

@ -1,2 +0,0 @@
$s = "Hëlló Wørłð"
$s.Length

View file

@ -1,2 +0,0 @@
$s = "Hëlló Wørłð"
[System.Text.Encoding]::Unicode.GetByteCount($s)

View file

@ -1 +0,0 @@
[System.Text.Encoding]::UTF8.GetByteCount($s)

View file

@ -1,5 +0,0 @@
;; r2
length? "møøse"
;; r3
length? to-binary "møøse"

View file

@ -1,2 +0,0 @@
;; r3
length? "møøse"

View file

@ -1,11 +1,15 @@
/*REXX program displays the lengths (in bytes/characters) for various strings. */
/* 1 */ /*a handy-dandy over/under scale.*/
/* 123456789012345 */
hello = 'Hello, world!' ; say 'the length of HELLO is ' length(hello)
happy = 'Hello, world! ' ; say 'the length of HAPPY is ' length(happy)
jose = 'José' ; say 'the length of JOSE is ' length(jose)
nill = '' ; say 'the length of NILL is ' length(nill)
null = ; say 'the length of NULL is ' length(null)
sum = 5+1 ; say 'the length of SUM is ' length(sum)
/* [↑] is, of course, 6. */
/*stick a fork in it, we're done.*/
-- 8 Nov 2025
include Setting
say 'STRING LENGTH'
say version
say
a=''; b='A string'; c='José'; d=1/7
say 'String Length'
say Left(a,12) Length(a)
say Left(b,12) Length(b)
say Left(c,12) Length(c)
say Left(d,12) Length(d)
exit
include Abend

View file

@ -1 +0,0 @@
Js.String2.length("abcd") == 4

View file

@ -1 +0,0 @@
LenB(string|varname)

View file

@ -1 +0,0 @@
Len(string|varname)