首页 > Web开发 > 详细

Golang 与 JS 的字符串截取大同小异

时间:2020-07-30 00:19:01      阅读:111      评论:0      收藏:0      [点我收藏+]

 

Golang 和 JS 的字符串截取都可以利用索引定位的方式。

 

Golang:

str := "abcdef"

sub := str[1: 2]

 

JS:

const str = ‘abcdef‘

const sub = str.substring(1, 2)

 

Link:https://www.cnblogs.com/farwish/p/13400119.html

Golang 与 JS 的字符串截取大同小异

原文:https://www.cnblogs.com/farwish/p/13400119.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!