let newStr = String(str[..<index]) // = str.substring(to: index) In Swift 3
let newStr = String(str[index...]) // = str.substring(from: index) In Swif 3
let newStr = String(str[range]) // = str.substring(with: range) In Swift 3

最新文章

  1. linux按键驱动之poll
  2. C#实现JSON序列化与反序列化
  3. 第 18 章 CSS 表格与列表
  4. Android开发之补间动画、XML方式定义补间动画
  5. 多词查询(Multi-word Queries)
  6. 泛型约束 where T : class,new()
  7. IE6/7/8兼容问题、时间对象返回NAN
  8. USACO 5.4 Character Recognition(DP)
  9. linux内核打印&quot;BUG: scheduling while atomic
  10. android开发之Toast的多种应用
  11. Centos下删除文件名乱码文件
  12. java实现双端链表
  13. A - Next_permutation
  14. perl tk说明
  15. 模拟Vue之数据驱动3
  16. 数据契约(DataContract)的作用
  17. bzoj3930[CQOI2015]选数 容斥原理
  18. 清理out的浏览器收藏夹发现的
  19. 一种简单的 rem 单位基准设置
  20. Jenkins控制台显示乱码

热门文章

  1. Linux 脚本点滴知识积累
  2. linux rz xshell
  3. D - Sigma Function 1~n内有多少个约数和为偶数
  4. PHP 几种 序列化/反序列化的方法
  5. android Material design是什么
  6. android自定义View_1——Custom Drawing
  7. 傅里叶叠层成像FP(Fourier Ptychographic Imaging)查资料
  8. TensorFlow实战:Chapter-4(CNN-2-经典卷积神经网络(AlexNet、VGGNet))
  9. &quot;无法加载 DLL“oramts.dll”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)。&quot; —— 的解决方法
  10. 《从零开始学Swift》学习笔记(Day 31)——存储属性