replaceSpecialCharacters static method
Implementation
static String replaceSpecialCharacters(String dirPath) {
dirPath = dirPath.replaceAll(pattern, '');
dirPath = dirPath.replaceAll(' ', '-');
dirPath = dirPath.replaceAll(RegExp(r'[^\u0009\u000a\u000d\u0020-\uD7FF\uE000-\uFFFD]'), '');
dirPath = dirPath.replaceAll(
RegExp(r'[\uD83D\uFFFD\uFE0F\u203C\u3010\u3011\u300A\u166D\u200C\u202A\u202C\u2049\u20E3\u300B\u300C\u3030\u065F\u0099\u0F3A\u0F3B\uF610\uFFFC]'), '');
return dirPath;
}