- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Ankita Saini has Published 319 Articles
Ankita Saini
648 Views
In Swift, a substring is a small sequence of characters present in the large string, for example, “Car color is blue”, then “Car”, “color”, “is”, and “blue” are the substrings of the given string. Swift provides the following methods to check if the string contains the specified substring or not ... Read More
Ankita Saini
3K+ Views
A whitespace character is a non-printable character which represents a space in the string. To remove all the whitespaces from a string Swift provides the following methods − Using isWhitespace Property Using component() function Using replacingOccurrences(of:with:) method Using regular expressions Method 1: Using isWhitespace Property isWhitespace property is ... Read More
Ankita Saini
453 Views
In Swift, pad a string with 0’s is to add 0 in the given string either on the left side or on the right side, for example, 234000 or 00021. Here we are going to pad a string with 0’s on the right side using the following methods − ... Read More
Ankita Saini
339 Views
In Swift, pad a string with 0’s is to add 0 in the given string either on the left side or on the right side, for example, 34000 or 0003232. Here we are going to pad a string with 0’s on the left side. Example Input: String = "151" ... Read More
Ankita Saini
142 Views
An enumeration or enum is a user-defined data type which holds a set of related values. It is defined by using the enum keyword. It is also known as an enum case because it uses case keywords to declare values inside it. In Swift, we are allowed to create an ... Read More
Ankita Saini
237 Views
A queue is a data structure which worked upon FIFO(first in first out) principle. In a queue, both ends are open, so that we can add a new element from one end called the rear or tail, this operation is known as enqueue and remove element from another end called ... Read More
Ankita Saini
351 Views
A switch statement is a control flow statement in which it only executes the block of code as soon as the expression given in the switch statement matches a case among the given multiple cases. If no case satisfies the given expression, then the switch statement executes the default case. ... Read More
Ankita Saini
592 Views
A Linked list is a data structure which is used to store and manage data. It is a sequence of nodes where each not contains two things: data and the reference to the next node in the given sequence. Using a linked list we can easily insert or remove elements ... Read More
Ankita Saini
95 Views
In Swift, we can easily get a character from the given string with the help of their respective index value. So to get the index of the specified character Swift provides an inbuilt function named index(). This function will return an index which is the specified distance from the specified ... Read More
Ankita Saini
941 Views
In Swift, a string is a collection of characters so it can contain duplicate as well as unique characters. So to find the duplicate characters in a string we create a dictionary/array to store the count of each character and then add those characters in the array whose count is ... Read More