Page 1 of 1

How can I search within a String Value?

Posted: Wed Apr 21, 2010 3:33 am
by Mani_rf
Hi...
How Can I find a string value within another one and get Start Index?

eg in Crystal report :

numberVar X;
X := InStr("This is a sample text","is"); // Return 5

How can I search within a String Value?

Posted: Wed Apr 21, 2010 6:56 am
by Jan
Hello,
Mani_rf wrote:Hi...
How Can I find a string value within another one and get Start Index?

eg in Crystal report :

numberVar X;
X := InStr("This is a sample text","is"); // Return 5
You can use following expression:

Code: Select all

{"This is a sample text".IndexOf("is""}
Thank you.