zoukankan      html  css  js  c++  java
  • 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();
  • 相关阅读:
    Rmarkdown:输出html设置
    Rmarkdown:输出pdf设置
    R语言绘图:雷达图
    R语言学习笔记(十五):获取文件和目录信息
    R语言学习笔记(十四):零碎知识点(41-45)
    R语言学习笔记(十三):零碎知识点(36-40)
    JVM调优-关于jvm的一些基本概念
    Markdown常用基本语法
    redis在windows中的安装
    jvm中加载类的全过程
  • 原文地址:https://www.cnblogs.com/flyfly/p/4776405.html
Copyright © 2011-2022 走看看