Java substring string when specific string occours : i need help to substring a string when a a substring occours.
Example

> Initial string: 123456789abcdefgh

> string to substr: abcd

> result : 123456789

I checked substr method but it accept index position value.I need to search the occorrence of the substring and than pass the index?

Thanks