Learn Python practically
and Get Certified.
Reference Materials
Certification Courses
Created with over a decade of experience and thousands of feedback.
Learn Python practically
and Get Certified.
Try Programiz PRO!
Learn Python practically
and Get Certified.
Swift String Methods
Checks if specified string is present in a string
removes a character in the string
adds a string value to another string
inserts a new character value into the string
checks if string begins with the specified string
checks if string ends with the specified string
converts all characters in the string to uppercase
converts all characters in the string to lowercase
breaks up a string at the specified separator
removes elements from string based on condition
removes whitespace from both ends of a string
return string with elements separated by separator
checks if two strings are equal
replace all matching characters in the string
removes the first character of the string
removes the last character of the string
reverses the given string
Swift Array Methods
inserts an element to the array
inserts a new element at the end of the array
checks whether the element is present or not
removes an element from the array
sorts the elements of an array in a specific order
removes all the elements from the array
returns the minimum element in the array
returns the maximum element in the array
reverse the order of an array
return string with elements separated by separator
removes the last element from the array
drops the first element
drops the last element in the array
swaps two elements in an array
removes elements present in specified indices
shuffles all the elements of an array
returns specified number of elements from first
returns specified number of elements from last
returns Bool based on given condition
returns elements that satisfy given condition
transforms the array
checks if the array is empty or not
returns the total number of elements present
returns number of elements
returns the first element of array
returns the last element of the array
Swift Dictionary Methods
removes all key-value pairs from the dictionary
returns a random key-value pair from dictionary
transforms all values of dictionary
checks whether key or value is present or not
iterates through key-value pairs of a dictionary
returns elements that satisfy given condition
iterates through each element of a dictionary
returns the max key-value pair in the dictionary
returns the min key-value pair in the dictionary
removes the certain key and its associated value
sorts the dictionary in a specific order
updates the value for the given key
checks if the dictionary is empty or not
returns the total number of elements present
returns the total number of elements
returns just the keys of the dictionary
returns the first key/value pair
Swift Set Methods
checks if specified element is present or not
returns all elements that satisfies the condition
iterate through each element of a set
forms intersection between two sets
inserts elements of the given sequence into set
inserts a new element at the end of the set
returns new set with elements common to both sets
returns true if two sets are disjoint sets
returns true if one set is subset of other
returns true if a set is superset of other set
returns the maximum element in the set
returns the minimum element in the set
removes the specified element from the set
removes elements from set based on a condition
removes the first element from the set
shuffles all the elements of a set
sorts the elements of the set in a specific order
returns the set difference of two sets
returns a new set with distinct elements
inserts the given element in the set
checks if the set is empty or not
returns the total number of elements present
returns the first element of array
Swift Double Methods
returns the absolute value
checks if one number is equal to another
checks if one number is less than another
checks if number is less than or equal to another
checks if one number is multiple of another
returns the maximum of the two given values
returns the minimum of the two given values
computes the floating point remainder
rounds the specified value to the closest int
returns the square root
calculates the quotient and remainder