if (!file.isFile())
return null;
int first_index = s.indexOf('-");
int last_index = s.lastIndexOf('-");
if (first_index < 0)
{
System.out.println("---------------------------------------------");
System.out.println("\tNo hyphen, skipping: '" + s + "'");
}
else if (first_index != last_index)
{
System.out.println("---------------------------------------------");
System.out.println("\tmore than one hyphen, skipping: '" + s + "'");
}
else
{
String left = s.substring(0, first_index);
String right = s.substring(first_index + 1);
String new_s = right + " - " + left;
System.out.println("'" + s + "' -> '" + new_s + "'");
return new_s;
}
return null;