How to get a length of a string iOS swift?

Solution:

The below functions are used for counting the number of characters in a particular string.


    var yourString: String = "string count"


If your string will be like above then

Swift 4:


yourString.count

Swift 2:

yourString.characters.count

Swift 1:

Count(yourString)


Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift