• 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();
  • 相关阅读:
    JS 信息提示弹框封装
    JS 功能弹框封装
    css3 弹框提示样式
    css3 弹框功能样式
    vscode使用Markdown文档编写
    .NET程序员提高效率的70多个开发工具
    Postman 使用方法详解
    【算法】从一组数中找出和为指定值的任意组合
    .NET Core的依赖注入
    .Net IOC框架入门之——Autofac
  • 原文地址:https://www.cnblogs.com/flyfly/p/4776405.html
Copyright © 2020-2023  润新知