Solved

subString

Posted on 2004-08-10
4
3,563 Views
Last Modified: 2013-12-24
How can I make a substring from the last index of a char to the end of the String.

IF I have the String "Hello and_ Welcome to _America" I want to extract the _America bit into a separate variable, how do I do this?

Basically how do I search for the last index of a char?

Spunog  
0
Comment
Question by:spunog
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
PE_CF_DEV earned 50 total points
ID: 11763456
treat the string as a list and look for listlast() in your example you want to do listlast("Hello and_ Welcome to _America","_")
0
 
LVL 6

Expert Comment

by:PE_CF_DEV
ID: 11763473
oh in addition you would have to add the _ back into the variable if you wanted _America instead of America.

0
 
LVL 35

Expert Comment

by:mrichmon
ID: 11763782
Yep that is the fastest way.
0
 

Author Comment

by:spunog
ID: 11763850
Cool thanks a mil
Spunog
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now