[fixed, thanks to zemiak123]
You may use the
String.indexOf[
^] method. Try
static String untilChar(String strIn, int chr)
{
int index = strIn.indexOf(chr);
if ( index != -1 )
{
strIn = strIn.substring(index);
}
return strIn;
}
public static void main( String arg[] )
{
String s = "4jl5kljza8100pFileName.pdf";
System.out.println( untilChar(s, 'F'));
}
[/fixed]