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,21 +0,0 @@
with Ada.Text_IO, Ada.Containers.Indefinite_Vectors, Ada.Strings.Fixed, Ada.Strings.Maps;
use Ada.Text_IO, Ada.Containers, Ada.Strings, Ada.Strings.Fixed, Ada.Strings.Maps;
procedure Tokenize is
package String_Vectors is new Indefinite_Vectors (Positive, String);
use String_Vectors;
Input : String := "Hello,How,Are,You,Today";
Start : Positive := Input'First;
Finish : Natural := 0;
Output : Vector := Empty_Vector;
begin
while Start <= Input'Last loop
Find_Token (Input, To_Set (','), Start, Outside, Start, Finish);
exit when Start > Finish;
Output.Append (Input (Start .. Finish));
Start := Finish + 1;
end loop;
for S of Output loop
Put (S & ".");
end loop;
end Tokenize;

View file

@ -1,30 +0,0 @@
identification division.
program-id. tokenize.
environment division.
configuration section.
repository.
function all intrinsic.
data division.
working-storage section.
01 period constant as ".".
01 cmma constant as ",".
01 start-with.
05 value "Hello,How,Are,You,Today".
01 items.
05 item pic x(6) occurs 5 times.
procedure division.
tokenize-main.
unstring start-with delimited by cmma
into item(1) item(2) item(3) item(4) item(5)
display trim(item(1)) period trim(item(2)) period
trim(item(3)) period trim(item(4)) period
trim(item(5))
goback.
end program tokenize.

View file

@ -1,5 +1,3 @@
s$ = "Hello,How,Are,You,Today"
a$[] = strsplit s$ ","
for s$ in a$[]
write s$ & "."
.
print strjoin a$[] "."

View file

@ -1,12 +1,12 @@
import system'routines;
import extensions;
public program()
public Program()
{
auto string := "Hello,How,Are,You,Today";
string.splitBy(",").forEach::(s)
{
console.print(s,".")
Console.print(s,".")
}
}

View file

@ -1,22 +0,0 @@
function split(sequence s, integer c)
sequence out
integer first, delim
out = {}
first = 1
while first<=length(s) do
delim = find_from(c,s,first)
if delim = 0 then
delim = length(s)+1
end if
out = append(out,s[first..delim-1])
first = delim + 1
end while
return out
end function
sequence s
s = split("Hello,How,Are,You,Today", ',')
for i = 1 to length(s) do
puts(1, s[i] & ',')
end for

View file

@ -1,2 +0,0 @@
$words = "Hello,How,Are,You,Today".Split(',')
[string]::Join('.', $words)

View file

@ -1,2 +0,0 @@
$words = "Hello,How,Are,You,Today" -split ','
$words -join '.'

View file

@ -1 +0,0 @@
"Hello,How,Are,You,Today", ",,Hello,,Goodbye,," | ForEach-Object {($_.Split(',',[StringSplitOptions]::RemoveEmptyEntries)) -join "."}

View file

@ -1,4 +0,0 @@
print ["Original:" original: "Hello,How,Are,You,Today"]
tokens: parse original ","
dotted: "" repeat i tokens [append dotted rejoin [i "."]]
print ["Dotted: " dotted]

View file

@ -1,13 +1,13 @@
/*REXX program separates a string of comma─delimited words, and echoes them ──► terminal*/
/*REXX program separates a string of comma-delimited words, and echoes them --> terminal*/
original = 'Hello,How,Are,You,Today' /*some words separated by commas (,). */
say 'The input string:' original /*display original string ──► terminal.*/
new= original /*make a copy of the string. */
do #=1 until new=='' /*keep processing until NEW is empty.*/
parse var new @.# ',' new /*parse words delineated by a comma (,)*/
end /*#*/ /* [↑] the new array is named @. */
say /* NEW is destructively parsed. [↑] */
say center(' Words in the string ', 40, "") /*display a nice header for the list. */
do j=1 for # /*display all the words (one per line),*/
say @.j || left(., j\==#) /*maybe append a period (.) to a word. */
end /*j*/ /* [↑] don't append a period if last. */
say center(' Endoflist ', 40, "") /*display a (EOL) trailer for the list.*/
Say 'The input string:' original /*display original string --> terminal.*/
new=original /*make a copy of the string. */
Do n=1 Until new=='' /*keep processing until NEW is empty.*/
Parse Var new word.n ',' new /*parse words delineated by a comma (,)*/
End /*n*/ /* [?] the new array is named word. */
Say /* NEW is destructively parsed. */
Say center('Words in the string',40,'-') /*display a nice header for the list. */
Do j=1 To n /*display all the words (one per line),*/
Say word.j||left(.,j\==n) /*maybe append a period (.) to a word. */
End /*j*/ /*Don't append a period after the last */
Say center('End-of-list',40,'-') /*display a (EOL) trailer for the list.*/

View file

@ -1 +1,7 @@
split $string ","
set string "Hello,How,Are,You,Today"
set tokens [split $string ","]
foreach tok $tokens {
puts -nonewline stdout "$tok\t"
}

View file

@ -1 +1,2 @@
join $list "."
set string_p [join $tokens "."]
puts stdout $string_p

View file

@ -1 +0,0 @@
puts [join [split "Hello,How,Are,You,Today" ","] "."]

View file

@ -1 +0,0 @@
puts [join [set words [split "Hello,How,Are,You,Today" ","]] "."]

View file

@ -1,2 +0,0 @@
s = "Hello,How,Are,You,Today"
WScript.StdOut.Write Join(Split(s,","),".")