Tagged: String

There are 15 items tagged #String.
And there a lots of other tags to explore.

How to join an Array of strings into a Single string in Swift

Learn how to turn ["John", "Alice", "Bob"] into "John, Alice, Bob".

Swift mod operator (%)

There might be several reasons that cause this error. I will share the solution that works for me.

How to declare Multiline String in Swift

If you need a string that spans several lines, Swift has a multiline string literal that you can use.

How to capitalize the first letter in Swift

Learn how to uppercase to only the first letter of a word and sentence.

NSAttributedString in SwiftUI

Find out what is the SwiftUI way of styling portions of text.

Different ways to check if a string contains another string in Swift

Learn how to check if a string contains another string, numbers, uppercased/lowercased string, or special characters.

Different ways to compare string in Swift

String comparison is an essential operation for day to day job. Swift provides a few variations for this. We will visit them in this article.

How to convert a String to an Int in Swift

Learn to convert a string "123" to an integer 123.

Different ways to sort an array of strings in Swift

Learn a proper way to sort an array of strings in each circumstance.

How to specify fractional digits for formatted number string in Swift

Learn how to format a Float and Double string.

How to Add inline images with text in SwiftUI

In iOS 14, we have a new way to put images along with texts.

Different ways to check for String suffix in Swift

Learn how to get a suffix from a Swift string.

Different ways to check for String prefix in Swift

Learn how to get a prefix from a Swift string.

How to compare two app version strings in Swift

Learn how to check your app version strings are higher or lower.

How to split a string into an array of substrings in Swift

Learn different ways to split a string into an array of substrings.

See all tags.