Solved

subString

Posted on 2004-08-10
4
3,572 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Restrict IIS Website without Windows login 7 58
cloud web Service looking for a home... 3 111
IIS Site Configuration Copy 2 78
PHP Register global 21 96
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

808 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