惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
The Cloudflare Blog
G
Google Developers Blog
博客园_首页
Martin Fowler
Martin Fowler
Apple Machine Learning Research
Apple Machine Learning Research
L
LangChain Blog
D
Docker
C
Check Point Blog
T
Tailwind CSS Blog
博客园 - 司徒正美
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
Microsoft Security Blog
Microsoft Security Blog
V
V2EX
博客园 - 叶小钗
T
The Blog of Author Tim Ferriss
酷 壳 – CoolShell
酷 壳 – CoolShell
IT之家
IT之家
M
MIT News - Artificial intelligence
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 【当耐特】
GbyAI
GbyAI

博客园 - ssnice

AI使用总结 常见问题汇总 mysql出现 You can't specify target table 'xx' for update in FROM clause 0.000 sec 常见linux命令 nlog sqlserver 定时自动备份 sqlserver 常见语法 mysql 常用命令(linux) mysql 连接数 最大并发数 windows mysql 主从同步 mysql基础语法 windows mysql8 安装 VS2022安装后,使用VS2019打开项目,出现无法找到.NET SDK的问题解决 Asp .Net Mvc5 缓存 DataBase First创建数据库 OpenXML_导入Excel到数据库 Linq/List/Array/IEnumerable等集合操作 Code First研究学习2_基本的错误及解决方法 C#中静态构造函数含义及使用
js中substring/substr和C#中Substring的用法
ssnice · 2014-05-10 · via 博客园 - ssnice

    一:在js中截取字符串的方法有两个:substring和substr

    1、方法:

    substring(int stringIndex,[int endIndex]) 截取从索引为stringIndex索引endIndex之间的字符

    substr(int stringIndex,[int Length])  截取从索引从stringIndex开始到后面的Length个字符

    2、注意事项:

    (1).这里的索引是从0开始的

    (2).substring后的参数starIndex是必须填写的,endIndex是可选参数

    (3).substr中的参数中stringIndex是必填参数,Length是可选参数

    3、substring的用法

      

    4、substr的用法

      

      二:C#中的Substring方法

      1.语法:Substring(int stringIndex)  返回从指定索引[还是从0开始]后的所有字符

          Substring(int StringIndex,int Length)  返回从指定索引后相应长度的字符

      2.用法

       (1)Substring(int stringIndex)的用法

          

       (2)Substring(int StringIndex,int Length)的用法