class LexicalIncludePaths {

  @NotNull
  public static String trimPathSeparators(@NotNull String path) {
    String result = path;
    if (result.endsWith(UNIX_SEPARATOR)) {
      result = result.substring(0, result.length() - 1);
    }
    if (result.startsWith(UNIX_SEPARATOR)) {
      result = result.substring(1);
    }
    return result;
  }

}