当前位置:网站首页>Part 32 supplement (32) string of ECMAScript
Part 32 supplement (32) string of ECMAScript
2022-06-27 17:03:00 【Embedded workplace】
1、String
String Object's valueOf() Method 、toString() Method will return String The original value of the type .
2、 String length
//(1) String length
var str = "fjfcjs"
console.log(str.length)
console.log("cjs".length)
3、 Access a single character
//(2) Access a single character
//charAt(): Access the characters at the specified index position ;
// Use the form of array subscript to access the array in the string
//charCodeAt(): Returns the Unicode
var str1 = "zxcvbnm"
console.log(str1.charAt(2))
console.log(str1[0])
console.log(str1.charCodeAt(0))
4、 Find string
//(3) Find string
//indexOf(): Retrieve the substring from the beginning of the string ( first )
//lastIndexOf(): Retrieve string from end of string ( the last one )
//searc边栏推荐
- Detailed explanation of transaction isolation level
- Ten common methods of arrays tools
- #yyds干货盘点#简述chromeV8引擎垃圾回收
- List to table
- Sword finger offer 22 The penultimate node in the linked list
- P.A.R.A 方法在思源的简易应用(亲测好用)
- localDateTime类型的时间(2019-11-19T15:16:17) 用oracle的时间范围查询
- Pragma once Usage Summary
- wheel ui
- What is RPC
猜你喜欢
随机推荐
2/14 preliminary calculation geometry
树莓派初步使用
Leetcode 5. Longest Palindromic Substring
09 route guard authenticates URL
Popularization of MCU IO port: detailed explanation of push-pull output and open drain output
Etcd可视化工具:Kstone部署(一),基于Helm快速部署
Bit. Store: long bear market, stable stacking products may become the main theme
Use pyinstaller to package py files into exe. Precautions and error typeerror:_ get_ sysconfigdata_ name() missing 1...‘ check_ Solutions to exists'
d3dx9_ How to repair 25.dll? d3dx9_ 25.dll where to download
Sliding window + monotone queue concept and example (p1886 Logu)
LeetCode 124. Binary tree maximum path sum - binary tree series question 8
Leetcode 46 Full Permutation
阿里云刘珅孜:云游戏带来的启发——端上创新
Detailed explanation of various GPIO input and output modes (push-pull, open drain, quasi bidirectional port)
leetcode 142. Circular linked list II
简历如何去写?
leetcode 92. Reverse linked list II
软件测试-测试的概念,单元测试的详细介绍,如何设计测试用例
localDateTime类型的时间(2019-11-19T15:16:17) 用oracle的时间范围查询
C语言集合运算









