当前位置:网站首页>汉字的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
边栏推荐
猜你喜欢
随机推荐
The world is on fire, Google servers have crashed
C. Color the Picture(贪心/构造)
啊?现在初级测试招聘都要求会自动化了?
线性回归的多种实现方式
GTK在drawable区域绘图
An article to understand service governance in distributed development
php反序列化结构知识点实例分析
聊聊阻容降压原理 和 实际使用的电路
Get the Qiniu cloud address file and save it locally
JZ76 删除链表中重复的结点
【HDLBits 刷题】Verilog Language(4)Procedures 和 More Verilog Features 部分
5V升压充电8.4V芯片
新库上线 | CnOpenData国际货运代理信息数据
百度智能云章淼:详解企业级七层负载均衡开源软件BFE
ict的终极模式 是软件研发
八、HikariCP源码分析之ConcurrentBag一
GBASE 8s 数据索引
GBASE 8s 用户标示与鉴别
E. XOR Tree(树形dp/异或/最近公共祖先)
Sorry, it's hard for you to earn middle-aged money