1 public static String pathManipulation(String path) {
2 HashMap<String, String> map = new HashMap<String, String>();
3 map.put("a", "a");
4 map.put("b", "b");
5 map.put("c", "c");
6 map.put("d", "d");
7 map.put("e", "e");
8 map.put("f", "f");
9 map.put("g", "g");
10 map.put("h", "h");
11 map.put("i", "i");
12 map.put("j", "j");
13 map.put("k", "k");
14 map.put("l", "l");
15 map.put("m", "m");
16 map.put("n", "n");
17 map.put("o", "o");
18 map.put("p", "p");
19 map.put("q", "q");
20 map.put("r", "r");
21 map.put("s", "s");
22 map.put("t", "t");
23 map.put("u", "u");
24 map.put("v", "v");
25 map.put("w", "w");
26 map.put("x", "x");
27 map.put("y", "y");
28 map.put("z", "z");
29
30 map.put("A", "A");
31 map.put("B", "B");
32 map.put("C", "C");
33 map.put("D", "D");
34 map.put("E", "E");
35 map.put("F", "F");
36 map.put("G", "G");
37 map.put("H", "H");
38 map.put("I", "I");
39 map.put("J", "J");
40 map.put("K", "K");
41 map.put("L", "L");
42 map.put("M", "M");
43 map.put("N", "N");
44 map.put("O", "O");
45 map.put("P", "P");
46 map.put("Q", "Q");
47 map.put("R", "R");
48 map.put("S", "S");
49 map.put("T", "T");
50 map.put("U", "U");
51 map.put("V", "V");
52 map.put("W", "W");
53 map.put("X", "X");
54 map.put("Y", "Y");
55 map.put("Z", "Z");
56
57 map.put(":", ":");
58 map.put("/", "/");
59 map.put("\\", "\\");
60 map.put(".", ".");
61 map.put("-", "-");
62 map.put("_", "_");
63
64 map.put("0", "0");
65 map.put("1", "1");
66 map.put("2", "2");
67 map.put("3", "3");
68 map.put("4", "4");
69 map.put("5", "5");
70 map.put("6", "6");
71 map.put("7", "7");
72 map.put("8", "8");
73 map.put("9", "9");
74
75 String temp = "";
76 for (int i = 0; i < path.length(); i++) {
77 if (map.get(path.charAt(i) + "") != null) {
78 temp += map.get(path.charAt(i) + "");
79 }
80 }
81 return temp;
82 }

最新文章

  1. Jenkins学习二:Jenkins安装与配置
  2. Spring第十篇—举例实现AOP
  3. linux强制umount设备的方法
  4. iOS中关于.pch的新建与配置问题
  5. cocos2d-x混合BlendFunc的使用
  6. Mint Linuxubuntu 字体配置文件
  7. Apache Shiro入门实例
  8. Two kinds of Quaternion SlerpImp (Unity)
  9. Visual Studio 调试技巧 (二)-- 为中断设置条件
  10. Swift - 12 - 区间运算符和for-in
  11. springJdbc like模糊查询,Spring namedParameterJdbcTemplate like查询
  12. CharMatch(括号匹配)
  13. 【数据结构】赫夫曼树的实现和模拟压缩(C++)
  14. 前端——HTML
  15. R语言预测实战(游浩麟)笔记2
  16. 如何实现.net程序的进程注入
  17. ElasticSearch5.3安装head插件及连接ElasticSearch
  18. ios开发之--UITableView中的visibleCells的用法
  19. Postman 常用测试结果验证及使用技巧
  20. BZOJ 1283: 序列

热门文章

  1. 查找php-fpm
  2. DP4056软硬兼容TP4056,低成本
  3. shm
  4. CTF学习笔记(二)
  5. WPF 实现雪花效果
  6. [OC] 按照 元素 中的某个属性 来对数组进行排序
  7. Flink RocksDB参数调优说明
  8. Java_用数组保存并显示杨辉三角
  9. python菜鸟学习: 11. 装饰器的基础用法
  10. 一套 .NET开发的邮箱Mail开源库