Solved

subString

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

832 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