RE: Isn't there a substring(start, end)-function????
> Hi all,
> Am I blind, or what? I can't find any quick way to do the following in
> substring(beginIndex, endIndex) witch returns the substring between
> beginIndex and endIndex.
> text = "If someone attacks you with a banana"
> print text.substring(0,3)
> Should print "If "
> I've found absolutely everything else that I expect from a modern
> programming language, but none of the modules (not even "string"!)
> seems to have what I'm looking for.
> Please tell me I'm blind!
There isn't a substring function, because it's not necessary as slices do the job.
The short answer is:
text = "If someone attacks you with a banana"
but its explained much more fully in
This message has been checked for all known viruses by the MessageLabs Virus Scanning Service.
|All times are GMT. The time now is 12:30 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.