Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

how to get rid of excess space in swift

let str = "  Taylor Swift  "
let trimmed = str.trimmingCharacters(in: .whitespacesAndNewlines) // prints "Taylor Swift"
Source by www.hackingwithswift.com #
 
PREVIOUS NEXT
Tagged: #rid #excess #space #swift
ADD COMMENT
Topic
Name
6+8 =