code: private String _removeFirst(String string, String toRemove)
      {
          // do exactly what String.replaceFirst(toRemove, "") internally does,
          // except treating the search as literal text and not as regex
  
          return Pattern.compile(toRemove, Pattern.LITERAL).matcher(string).replaceFirst("");
      }
docs: Removes the first appearance of toRemove in string.
  
  Works just like string.replaceFirst(toRemove, ""), except that toRemove
  is not treated as a regex (which could cause problems with filenames).
  
  @param string
  @param toRemove
  @return