Re: Convert a string into a list without Delimiters
Re: Convert a string into a list without Delimiters
- Subject: Re: Convert a string into a list without Delimiters
- From: JJ <email@hidden>
- Date: Fri, 09 Nov 2001 11:20:34 +0100
>
Does somebody have an idea how to convert a string in
>
to a list without having delimiters in the string.
>
I would like to put a block of 4 characters to a list
>
item, so
>
item 1 = characters 1-4
>
item 2 = characters 5-8
>
item 3 = characters 9-13
>
etc.
>
Does anybody knows an OSAX for this.
>
I denitely do not want to use a repeat function,
>
because I am dealing with (very) huge strings.
>
Try using Akua Sweets
set k to "nanierodelmundom"
every paragraph of (encrypt the text k breaking lines longer than 2)
--> return, for me:
{"nani", "erod", "elmu", "ndom", ""}
But this command is a little strange and not always return the desired
result.
You could (akua sweets, too) use "decompose":
set k to "nanierodelmundom"
decompose k by "~c4c4"
-- returns:
{{"nani", "erod"}}
In a huge text, "decompose by "~c4c4c4c4c4c4c4c4..."
You'l see.
JJ