日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

js String方法集合

發布時間:2025/3/13 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 js String方法集合 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
//https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
//
返回對應索引的字符 chartAt() //返回對應所引的字符的統一碼(Unicode value) charCodeAt() //Returns a non-negative integer that is the UTF-16 encoded code point value at the given position. codePointAt(); //拼接兩個字符串,并返回一個新的字符串 concat(); //Determines whether one string may be found within another string. includes(); //Determines whether a string ends with the characters of another string. endsWidth(); //返回一個字符串在另一個字符串中首次出現的位置,如果查找不到,返回-1 indexOf(); //返回一個字符串在另一個字符串中末次出現的位置,如果查找不到,返回-1 lastIndexOf(); //Returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order. localeCompare(); //用字符串匹配一個字符串 mach(); //Returns the Unicode Normalization Form of the calling string value. normalize(); //Returns a string consisting of the elements of the object repeated the given times. repeat(); //找出字符串中和正則表達式匹配的部分,并用一個新的子串替換 replace(); //找出字符串中和正則表達式匹配的部分 search(); //截取字符串的一部分返回 slice(); //把一個字符串分割成數組,分割點為傳入的子串 split(); //Returns the characters in a string beginning at the specified location through the specified number of characters. substr(); // substring();// toLocalLowerCase();// toLocalUpperCase();toLowerCase(); toSource();toString(); toUpperCase(); trim(); valueOf();

?

轉載于:https://www.cnblogs.com/flyfly/p/4776405.html

總結

以上是生活随笔為你收集整理的js String方法集合的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。