Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,2 +0,0 @@
|
|||
Str : String := "Hello World";
|
||||
Length : constant Natural := Str'Size / 8;
|
||||
|
|
@ -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;
|
||||
|
|
@ -1 +0,0 @@
|
|||
FUNCTION BYTE-LENGTH(str)
|
||||
|
|
@ -1 +0,0 @@
|
|||
LENGTH OF str
|
||||
|
|
@ -1 +0,0 @@
|
|||
FUNCTION LENGTH-AN(str)
|
||||
|
|
@ -1 +0,0 @@
|
|||
FUNCTION LENGTH(str)
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import extensions;
|
||||
|
||||
public program()
|
||||
public Program()
|
||||
{
|
||||
var s := "Hello, world!"; // UTF-8 literal
|
||||
var ws := "Привет мир!"w; // UTF-16 literal
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import extensions;
|
||||
|
||||
public program()
|
||||
public Program()
|
||||
{
|
||||
var s := "Hello, world!"; // UTF-8 literal
|
||||
var ws := "Привет мир!"w; // UTF-16 literal
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
(length "hello")
|
||||
;; => 5
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
(string-bytes "\u1D518\u1D52B\u1D526")
|
||||
;; => 12
|
||||
|
|
@ -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
|
||||
|
|
@ -1 +0,0 @@
|
|||
print(1,length("Hello World"))
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
$s = "Hëlló Wørłð"
|
||||
$s.Length
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
$s = "Hëlló Wørłð"
|
||||
[System.Text.Encoding]::Unicode.GetByteCount($s)
|
||||
|
|
@ -1 +0,0 @@
|
|||
[System.Text.Encoding]::UTF8.GetByteCount($s)
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
;; r2
|
||||
length? "møøse"
|
||||
|
||||
;; r3
|
||||
length? to-binary "møøse"
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
;; r3
|
||||
length? "møøse"
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
Js.String2.length("abcd") == 4
|
||||
|
|
@ -1 +0,0 @@
|
|||
LenB(string|varname)
|
||||
|
|
@ -1 +0,0 @@
|
|||
Len(string|varname)
|
||||
Loading…
Add table
Add a link
Reference in a new issue