Solved

trim ( off string

Posted on 2007-03-19
4
841 Views
Last Modified: 2008-01-09
Hello Experts,
Can you help me with string manipulation?
I would like to take this string:
English Language(2)
and take of the everything to the right of the parenthesis so the string looks like this:
English Language
I have made a few attemps with no luck.
Any help you can provide would be appreciated.
0
Comment
Question by:shogun5
  • 2
  • 2
4 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 50 total points
ID: 18753603
Try this

Create a frmula
Name - RemoveParen
Formula
Local NumberVar ParenLoc;
ParenLoc := InStr({YourString}, "(");
Left({YourString},ParenLoc-1)

mlmcc
0
 

Author Comment

by:shogun5
ID: 18753645
Yep...that was it!  
Thank you.
Can you explain what is happening with this code:

  Left({YourString},ParenLoc-1)

Thank you.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 18753815
Left(String,Length)

It takes the first length characters of the string.
ParenLoc has the position of the ( so you want the characters upto but not including that one thus the need to subtract 1

mlmcc
0
 

Author Comment

by:shogun5
ID: 18754042
Thank you.
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

733 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