//package Main;
public class TestDay {
public static void main(String[] args) {
args = new String[]{"yang"} ;
for (String i : args)
System.out.println(i) ;
String a = "yangMUFA" ;
String b = "YANGmufa" ;
System.out.println(a.compareTo(b)) ;
System.out.println(a.compareToIgnoreCase(b)) ;
String y = "yangmufa-photo-杨.jpg" ;
int beginIndex=y.indexOf("-",y.indexOf("photo"))+1 ;//返回从 fromIndex位置开始查找指定字符在字符串中第一次出现处的索引
int endIdex=y.lastIndexOf("." ) ;//返回指定字符在此字符串中最后一次出现处的索引,如果此字符串中没有这样的字符,则返回 -1。
System.out.println(y.substring(beginIndex,endIdex)) ;
System.out.println(beginIndex);
}
}
class t {
static int a = 0;
public static int[] t1(int aa[]) {
int aaa[] = aa ;
return aaa ;
}
public void getarray(int aaaa[]) {
for (int i : aaaa) {
System.out.print(i) ;
}
}
}
class StringUtil1{
public static String initcap1(String str) {
//如果字符串str为null和""则返回原数据
if (str == null || "".equals(str)) {
return str;
}
if (str.length() == 1) {
//如果字符串str的长度为1,则调用专门把字符串转换为小写的string方法tuUpperCase()
return str.toLowerCase();
}
//用字符串截取方法subString()截取第一个字符并调用toUpperCase()方法把它转换为小写字母
//再与从str第二个下标截取的字符串拼接
return str.substring(0, 1).toLowerCase() + str.substring(1);
}
}
/*-------------------反爬声明o(▽)咻咻咻--------------------
作者:**杨木发** 版权声明: 本文为博主倾情原创文章,整篇转载请附上源文链接!
如果觉得本文对你有所收获,你的请评论点赞 与
合理优质的转发也将是鼓励支持我继续创作的动力,
更多精彩可百度搜索 杨木发 或:
个人网站:杨木发的自留地 - 此地无银三百两 ,
GitHub:https://github.com/yangmufa ,
坚持创作 善于总结 开源共享 高质进步。
-------------------反爬声明o(▽)咻咻咻--------------------*/