String slicing substring — Mastering Swift 4 — Fourth Edition

path.substring(to: startIndex)
// returns the “/one”
path.substring(from: endIndex)
// returns the “/four”
  1. substring(to:)
  2. substring(from:)
path[…startIndex]
// returns the “/one”
path[endIndex…]
// returns the “/four”

--

--

--

Software Engineer (Android, iOS, Unity) | M.Sc. Computer Science — Technische Universitaet Berlin | Mobile Advertising, Attribution, Monetisation, UA & Analytic

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Akarsh SEGGEMU

Akarsh SEGGEMU

Software Engineer (Android, iOS, Unity) | M.Sc. Computer Science — Technische Universitaet Berlin | Mobile Advertising, Attribution, Monetisation, UA & Analytic

More from Medium

How to resolve the swiping right action when trying to navigate to a previous screen in iOS.

Creating Objects without Specifying their Concrete Classes

Pros & Cons Of Swift Programming Language

Tuist Your Circle — Building A Project Faster With CircleCI — Part 2