Skip to Content
0
Former Member
May 11, 2010 at 06:38 AM

How to find out the index in string.

40 Views

Hello Experts,

I have a requirement in which i have to find out the index of the last space before the 50th position in a string.

is there any way other than spliting the string.

e.g. if string is - 'aaaa aaaa aaa........ aaa aaa'(length is more than 50)

i want the last space before 50th char.because i want to split the string before last word withing 50 th character

please help.

Thanks,

Shweta