Hi,
I just realized I need to split a potentially pretty long textfield
input from a web form into 2000 character chunks, for input into a
database. I see a lot of string functions in DTML, but none that
looks like it will do this..
I'm hoping to use this as a workaround for the seeming
Chris Beaumont wrote:
Hi,
I just realized I need to split a potentially pretty long textfield
input from a web form into 2000 character chunks, for input into a
database. I see a lot of string functions in DTML, but none that
looks like it will do this..
Use a Python Script:
I just realized I need to split a potentially pretty long textfield
input from a web form into 2000 character chunks, for input into a
database. I see a lot of string functions in DTML, but none that
looks like it will do this..
string slices.
somestring[:1999] is the first 2000
On Fri, 15 Dec 2000, Steve Drees wrote:
somestring[:1999] is the first 2000 characters of somestring.
Not to be a poseur but:
somestring[:1999] is the first 1999 characters of somestring, because
in Python indices begin at 0, e.g.:
a="0123"
print a[:3] gives "012" which are the first 3
Jerome Alet wrote:
On Fri, 15 Dec 2000, Steve Drees wrote:
somestring[:1999] is the first 2000 characters of somestring.
Not to be a poseur but:
me either ;^)=
somestring[:1999] is the first 1999 characters of somestring, because
in Python indices begin at 0, e.g.:
Actually, it