|
2008-04-06 |
|
String Manipulation,就是对代码中使用到的字符串进行相关的操作,当然在IDEA中已经有不少功能,如大小写切换等。在实际的开发中,我们可能需要对字符串进行更多的转换,如去除空格、xml,javascript,sql转换等,这些都是经常遇到的,事实上程序中也会使用,这也是为何有那么多的StringUtil类。String Manipulation插件就是将这些StringUtil类的功能提升到IDE对字符串处理当中来,这样就会方便很多。现在String Manipulation提供以下特性:
- Un/Escape selected Java text
- Un/Escape selected JavaScript text
- Un/Escape selected HTML text
- Un/Escape selected XML text
- Un/Escape selected SQL text
- Trim selected text
- Trim all spaces in selected text
- Remove all spaces in selected text
- Encode selected text as URL
- Convert selected text to Camel Case
- Convert selected text to Constant Case
- Encode selected text to MD5 Hex16
- De/Encode selected text to Base64
只要你选中需要进行转换的文本,然后点击菜单栏的"Edit",选择”String Manipulation"选项,然后选择你需要执行的转换功能,这样就可以啦。你也可以使用快捷键,Alt+Shift+M,在弹出的菜单中选择你需要执行的操作项即可,非常方便。界面如下:

|