Very interesting
a small code for test
function setup()
ascii={"«","»","?","?","?","¬","?","×","?","?","?","^","“","‘","œ","?"}
displayMode(OVERLAY) ; textMode(CORNER)
StrDep=readText("Project:Fib2")
parameter.boolean("letters",false)
parameter.boolean("control_characters",false)
parameter.boolean("digits",false)
parameter.boolean("printable_characters_except_space",false)
parameter.boolean("lowercase_letters",false)
parameter.boolean("punctuation_characters",false)
parameter.boolean("space_characters",false)
parameter.boolean("uppercase_letters",false)
parameter.boolean("alphanumeric_characters",false)
parameter.boolean("hexadecimal_digits",false)
parameter.boolean("alphanumeric_characters_plus_underscore",false)
parameter.boolean("octal_digits",false)
parameter.boolean("union",false)
end
function draw()
background(41, 28, 140, 255) ; fill(241, 255, 0, 255)
fontSize(25)
set=""
if union then set=set.."[" end
if octal_digits then set=set.."0-7" end
if letters then set=set.."%a" end
if control_characters then set=set.."%c" end
if digits then set=set.."%d" end
if printable_characters_except_space then set=set.."%g" end
if lowercase_letters then set=set.."%l" end
if punctuation_characters then set=set.."%p" end
if space_characters then set=set.."%s" end
if uppercase_letters then set=set.."%u" end
if alphanumeric_characters then set=set.."%w" end
if hexadecimal_digits then set=set.."%x" end
if alphanumeric_characters_plus_underscore then set=set.."%w_" end
if union then set=set.."]" end
text("set="..set,340,700)
AffStrDep()
CreateTab()
AffStrFin()
end
function AffStrDep()
ligne=1
for i=1, string.len(StrDep), 100 do
text(string.sub(StrDep,i,i+100),340,400-ligne*80)
ligne=ligne+1
end
end
function CreateTab()
StrFin=""
tab={} ; i=1
for z in string.gmatch(StrDep,set) do
tab[i]=z
StrFin=StrFin..z.." "
end
end
function AffStrFin()
ligne=1
for i=1, string.len(StrFin), 100 do
text(string.sub(StrFin,i,i+100),600,400-ligne*80)
ligne=ligne+1
end
end