On 17-Apr-02, Ingo Hohmann wrote:
Hi Carl,
Am Die, 2002-04-16 um 13.16 schrieb Carl Read:
..
I tried to cut out the need for the charset in the following
function but it ends up in an infinate loop when it starts
comparing an empty string with an empty string. Can anyone think of
a rule
Neely [EMAIL PROTECTED]
Sujet: [REBOL] Re: Tip for splitting very long string ?
A: [EMAIL PROTECTED]
Hi, Richard,
COFFRE Richard FTO wrote:
Hi Rebol fellows,
Is there a tip to quickly split a very long string more than
2000 characters into n characters sub strings and to create
a list
Hi Carl,
Am Die, 2002-04-16 um 13.16 schrieb Carl Read:
..
I tried to cut out the need for the charset in the following function
but it ends up in an infinate loop when it starts comparing an empty
string with an empty string. Can anyone think of a rule that would
override that? Be
A couple of possibilities to check out below.
str: copy azertyuiopqsdfghjklmwxcvbnazertyuiopqsdfghjklmwxcvbn
string-split-up1: function [
string [string!] n [integer!]
][result subrule][
if lesser? n 1 [return none]
result: make block! divide length? str n
subrule: compose [1
Hi, Richard,
COFFRE Richard FTO wrote:
Hi Rebol fellows,
Is there a tip to quickly split a very long string more than
2000 characters into n characters sub strings and to create
a list with these subsets ?
For instance :
...
I want to split this string into substrings of 5
That's just I want to avoid but thanks because it's always useful to have several
solutions.
Message d'origine
Date: Mon, 15 Apr 2002 08:27:36 -0500
De: Joel Neely [EMAIL PROTECTED]
Sujet: [REBOL] Re: Tip for splitting very long string ?
A: [EMAIL PROTECTED]
Hi, Richard,
COFFRE
Forgive me if I seem competitive Joel, but I
couldn't resist. I think this would be faster,
featuring the insert tail instead of append
optimization (which I probably learned from you):
string: abcdefghijklmnopqrstuvwxyz
== abcdefghijklmnopqrstuvwxyz
block: copy []