Data types in Swift
Swift provides us with both built-in and user defined data types. The most common data types available with Swift are…
How to append a character to a string in Swift?
We can append a character to the string using append().
String mutability in Swift
We can allow a string to be modified (mutated) or not by assigning it to constant(let) (doesn’t allow modification) or…
How to include Unicode scalar values in String literals?
We can include unicode scalar values in string literal by using the format \u{n}. n varies from 1-8 digit hexadecimal numbers.
How to include special characters in String literals?
We can include the following special characters in String literals. \0 (null character) \” (double quotation) \’ (single quotation) \t …
JavaScript: String.replace()
The string replace method searches a string for a specified value and replaces it with a provided data. A new…
Swift: How to add extra zeroes to binary numbers?
We have to manually code to add extra zeroes to the binary number to make them as 8 digits.