String Char Position

Stimulsoft Reports.NET discussion
Post Reply
brjohnsmith
Posts: 35
Joined: Mon Jan 29, 2018 11:04 am

String Char Position

Post by brjohnsmith »

Hi,
is there a function to find a specific char into the string? if the only way is to code, please send me the code and how to install it.
ex: supposing that the string is: aabbcc112233-ddeeff445566, and the idea is to find the position of the char "-" in the string. the char position is 13.
I tried to use - string.indexof or instr but none of them worked, or I am using the wrong syntax.let me know if someone could help me.
thx.
Lech Kulikowski
Posts: 7341
Joined: Tue Mar 20, 2018 5:34 am

Re: String Char Position

Post by Lech Kulikowski »

Hello,

You can use IndexOf() function:
{YourValue.IndexOf("-")}

Thank you.
Attachments
Screenshot 2020-10-08 155041.jpg
Screenshot 2020-10-08 155041.jpg (59.16 KiB) Viewed 1424 times
Post Reply