当前位置:网站首页>汉字的URL转义字符函数
汉字的URL转义字符函数
2022-07-29 21:53:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
public class zhuanyi {
public static void main(String[] args) {
//中文字符串转义
String base = "\u5B66\u53F7";
for(int i = 0;i<= base.length();i++)
System.out.print(base.charAt(i)+ " ");
System.out.println();
}
}//点转换为反斜杠
public static String docToBackslash(String currentBao){
String baoName = currentBao.replace(".", "/");
return baoName;
}
//字符串首字母大写
public static String upperFirstChar(String str){
StringBuilder sb = new StringBuilder(str);
sb.setCharAt(0, Character.toUpperCase(sb.charAt(0)));
str = sb.toString();
return str;
}
//字符串拆分为数组
public static String[] stringToArray(String str){
String []array = str.split(",");
return array;
}发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/129648.html原文链接:https://javaforall.cn
边栏推荐
猜你喜欢

中科院TextMind(文心)安装及使用

SAP BC 源代码搜索

新库上线 | CnOpenData国际货运代理信息数据

Huawei Enjoy 50 Pro evaluation: HarmonyOS blessing is smoother and safer

高等数学(第七版)同济大学 习题3-7 个人解答

【板栗糖GIS】arcmap—标注太长,如何换行显示

Advanced Mathematics (Seventh Edition) Tongji University Exercises 3-7 Individual Answers

GTK进行rgb绘图

毕业论文文献综述写作技巧,超级详细!

The world is on fire, Google servers have crashed
随机推荐
GBASE 8s 数据库复合索引
Add a logo to the upper left corner of the picture, add time and address to the lower left corner, and wrap the line when the address reaches the specified length
iNFTnews | 福布斯的Web3探索
GBASE 8s 数据库的恢复
线性回归的多种实现方式
bright day
linux install redis using script
GTK在drawable区域绘图
03-树3 Tree Traversals Again(树的遍历)
WY16 不要二
数字孪生万物可视 | 联接现实世界与数字空间
【板栗糖GIS】arcmap—如何快捷替换属性表中的部分内容
5 V booster charge 8.4 V chip
毕业论文文献综述写作技巧,超级详细!
聊聊阻容降压原理 和 实际使用的电路
tkinter绘制组件(31)——支点标题
applet preview pdf
六、HikariConfig配置解析
GBASE 8s 自定义存储过程和函数示例
[HDLBits brush questions] Verilog Language (4) Procedures and More Verilog Features section