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 String方法集合的更多相关文章
- react.js 公共方法 集合
截取七牛上传图片的后缀名: export function getInputKey(info){ let self = this; let obj = JSON.parse(info); let qi ...
- js String方法总结
字符方法(3) charAt(pos: number): string; // 返回特定位置的字符. charCodeAt(index: number): number; // 返回表示给定索引的字符 ...
- js操作textarea方法集合
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"% ...
- Js获取后台集合List的值和下标的方法
Js获取后台集合List的值和下标的方法 转载自:http://blog.csdn.net/XiaoKanZheShiJie/article/details/47280449 首先用的是struts2 ...
- 2、C#面向对象:封装、继承、多态、String、集合、文件(上)
面向对象封装 一.面向对象概念 面向过程:面向的是完成一件事情的过程,强调的是完成这件事情的动作. 面向对象:找个对象帮你完成这件事情. 二.面向对象封装 把方法进行封装,隐藏实现细节,外部直接调用. ...
- jquery.validate.min.js 用法方法示例
页面html 代码 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://w ...
- JS扩展方法——字符串trim()
转自:http://www.cnblogs.com/kissdodog/p/3386480.html <head> <title>测试JS扩展方法</title> ...
- Js apply 方法 详解
Js apply方法详解 我在一开始看到JavaScript的函数apply和call时,非常的模糊,看也看不懂,最近在网上看到一些文章对apply方法和call的一些示例,总算是看的有点眉目了,在这 ...
- JS trim()方法使用
JS trim()方法使用上有浏览器限制: 1.直接使用 string.trim() 浏览器版本限制:JavaScript Version 1.8 2.间接使用<即自己使用正则构造类trim的 ...
随机推荐
- windows xp 无法连接wpa无线网络
其实以前一直是可以的,不知为什么前几天忽然就不能加入原有的无线网了.我的无线网是WPA加密的,采用DHCP分配IP(但针对特定MAC地址分配静态IP). 在网上找了许久,有的网友认为应该把无线网卡(那 ...
- Java:字符串类String的功能介绍
在java中,字符串是一个比较常用的类,因为代码中基本上处理的很多数据都是字符串类型的,因此,掌握字符串类的具体用法显得很重要了. 它的主要功能有如下几种:获取.判断.转换.替换.切割.字串的获取.大 ...
- [android警告] AndroidManifest.xml警告 Should explicitly set android:allowBackup to true or false
http://www.cnblogs.com/javadu/p/3812528.html Android中AndroidManifest.xml警告 Should explicitly set and ...
- php静态
static 是定义一个静态对象或静态变量,关于static 定义的变量或类方法有什么特性我们看完本文章的相关实例后就见分晓了. 1. 创建对象$object = new Class(),然后使用”- ...
- C#题型补充
让用户输入一个奇数,打印菱形,最长的行内容个数为用户输入的个数,并且由英文字母拼接而成 Console.Write("请输入一个数字:"); try { int a = Conve ...
- Linux音频编程指南
Linux音频编程指南 虽然目前Linux的优势主要体现在网络服务方面,但事实上同样也有着非常丰富的媒体功能,本文就是以多媒体应用中最基本的声音为对象,介绍如何在Linux平台下开发实际的音频应用程序 ...
- linux 系统 tar 的用法详解
[root@localhost xu]# tar --help 用法: tar [选项...] [FILE]... GNU ‘tar’ 将许多文件一起保存至一个单独的磁带或磁盘归档,并能从归档中单独还 ...
- U3D NGUI改变GameObject Activity闪烁的问题
不是关闭再激活GameObject会闪烁,而是再激活时,NGUI渲染步骤不一致导致的闪烁. 并且文字激活后渲染要慢一帧,如果延迟一帧处理,又会导致精灵图片快一帧,图片重叠.这个测试结果不一定准确,先记 ...
- Newtonsoft.Json序列化和反序列之javascriptConvert.SerializeObject,DeserializeObject,JsonWriter,JsonReader
这里下载:http://www.newtonsoft.com/products/json/安装: 1.解压下载文件,得到Newtonsoft.Json.dll 2.在项目中添加引用.. jav ...
- [HDOJ5583]Kingdom of Black and White(暴力)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5583 一个01串,求修改一个位置,使得所有数均为0或1的子串长度的平方和最大.先分块,然后统计好原来的 ...