zoukankan      html  css  js  c++  java
  • 2020 8 3 每日总结

    继续第五章

    字符串操作。

    获取子字符串,substring(int beginindex),返回从指定位置开始到字符串结尾的字符串。substring(int beginindex,int endindex),返回指定起始于结束位置的字符串。

    去除空格,str.trim(),返回字符串的副本,忽略前导空格与尾部空格。

    字符串替换。str.replease(char oldChar,char newChar),返回新字符串

    判断字符串开始于结尾,str.startsWith(String prefix),prefix是前缀字符串,str.endsWith(String suffix),suffix是后缀字符串,

    判断字符串是否相等。str.equals(String otherstr),返回true和false,str.equalslgnoreCase(String otherstr),区分大小写。

    按照字典顺序比较字符串。str.compareTo(String otherstr),string在参数之前,返回正整数,相等返回0,繁反之返回负整数。

  • 相关阅读:
    jQuery动画速成
    elementui更改导航栏样式
    Python反射
    Linux基础--基本命令
    Linux基础--简介
    DRF
    Socket与Websocket初识
    五星宏辉游戏项目小结
    Redis详解(8)--redis-cluster
    Redis详解(7)--主从复制
  • 原文地址:https://www.cnblogs.com/fuxw4971/p/13429513.html
Copyright © 2011-2022 走看看