public static String expandHiddenDir(final String filename){
  final int macro=filename.indexOf(hiddenDirMacro,0);
  String expandedFilter;
  if (macro == -1) {
    return filename;
  }
  if (Cfg.DEBUG) {
    Check.log(TAG + " expanding macro");
  }
  expandedFilter=filename.replaceFirst("\\$dir\\$",StringUtils.chomp(Path.hidden(),"/"));
  if (Cfg.DEBUG) {
    Check.log(TAG + " expandedFilter: " + expandedFilter);
  }
  return expandedFilter;
}

public static String expandHiddenDir ( final String filename ) { final int macro = filename . indexOf ( hiddenDirMacro , 0 ) ; String expandedFilter ; if ( macro == - 1 ) { return filename ; } if ( Cfg . DEBUG ) { Check . log ( TAG + " expanding macro" ) ; } expandedFilter = filename . replaceFirst ( "\\$dir\\$" , StringUtils . chomp ( Path . hidden ( ) , "/" ) ) ; if ( Cfg . DEBUG ) { Check . log ( TAG + " expandedFilter: " + expandedFilter ) ; } return expandedFilter ; }
transforms " something $ dir $ / other / " to " something / path / to / hidden / other / "
