How can I search within a String Value?

Stimulsoft Reports.NET discussion
Post Reply
Mani_rf
Posts: 2
Joined: Wed Apr 21, 2010 3:15 am
Location: Iran

How can I search within a String Value?

Post 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
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

How can I search within a String Value?

Post 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.
Post Reply