☰
Kotlin Tutorial
Kotlin - Basic
Kotlin - Installation
Kotlin - Variables
Kotlin - Data Types
Kotlin - Val
Kotlin - Type Casting
Kotlin - Operators
Kotlin - Input & Output
BRANCHING
Kotlin - If - Else
Kotlin - When
LOOPS
Kotlin - While Loop
Kotlin - Do - While Loop
Kotlin - For Loop
Kotlin - Break
Kotlin - Continue
DATA TYPES
Kotlin - Numbers
Kotlin - Boolean
Kotlin - Strings
Kotlin - String Functions
ARRAY
Kotlin - Arrays
Kotlin - arrayOf() Function
Kotlin - Iterating Array
Kotlin - Replace Array Elements
Kotlin - Sort Array Elements
LIST
Kotlin - Lists
Kotlin - Accessing List
Kotlin - Replace List Elements
Kotlin - Insert in List
Kotlin - Join two Lists
Kotlin - Remove from List
Kotlin - Copy from List
Kotlin- Sort List Elements
Kotlin - Reverse a List
Kotlin - List Functions
SET
Kotlin - Set
Kotlin - Iterating Set
Kotlin - Accessing Set
Kotlin - Insert in Set
Kotlin - Join two Sets
Kotlin - Remove from Set
Kotlin - Copy from Set
Kotlin- Sort Set Elements
Kotlin - Reverse a Set
Kotlin - Set Functions
MAP
Kotlin - Map
Kotlin - Iterating Map
Kotlin - Insert in Map
Kotlin - Update Map
Kotlin - Remove from Map
Kotlin - Copy from Map
Kotlin - HashMap
Kotlin - Map Functions
FUNCTION
Kotlin - Function
Kotlin - Function Arguments
Kotlin - Function Overloading
Kotlin - Recursion
Kotlin - Lambda/Anonymous Function
Kotlin - Scope
Kotlin - Import
OOPS
Kotlin - OOPS
Kotlin - Classes & Objects
Kotlin - Constructors
Kotlin - Inheritance
Kotlin - Method Overriding
Kotlin - Abstract Class
Kotlin - Interface
Kotlin - Data Class
Kotlin - Sealed Class
EXCEPTION
Kotlin - Exception Handling
Kotlin - Custom Exception
DATE TIME
Kotlin - Date & Time
REGEX
Kotlin - Regex
Regex - Functions
Regex - Meta-Characters
Regex - Special Sequences
ADVANCED
Kotlin - Operator Overloading
JAVA
SPRING
SPRINGBOOT
HIBERNATE
HADOOP
HIVE
ALGORITHMS
PYTHON
GO
KOTLIN
C#
RUBY
C++
OTHERS
JAVA
SPRING
SPRINGBOOT
HIBERNATE
HADOOP
HIVE
ALGORITHMS
PYTHON
GO
KOTLIN
C#
RUBY
C++
Kotlin Tutorial
Kotlin - Basic
Kotlin - Installation
Kotlin - Variables
Kotlin - Data Types
Kotlin - Val
Kotlin - Type Casting
Kotlin - Operators
Kotlin - Input & Output
BRANCHING
Kotlin - If - Else
Kotlin - When
LOOPS
Kotlin - While Loop
Kotlin - Do - While Loop
Kotlin - For Loop
Kotlin - Break
Kotlin - Continue
DATA TYPES
Kotlin - Numbers
Kotlin - Boolean
Kotlin - Strings
Kotlin - String Functions
ARRAY
Kotlin - Arrays
Kotlin - arrayOf() Function
Kotlin - Iterating Array
Kotlin - Replace Array Elements
Kotlin - Sort Array Elements
LIST
Kotlin - Lists
Kotlin - Accessing List
Kotlin - Replace List Elements
Kotlin - Insert in List
Kotlin - Join two Lists
Kotlin - Remove from List
Kotlin - Copy from List
Kotlin- Sort List Elements
Kotlin - Reverse a List
Kotlin - List Functions
SET
Kotlin - Set
Kotlin - Iterating List
Kotlin - Accessing Set
Kotlin - Insert in Set
Kotlin - Join two Sets
Kotlin - Remove from Set
Kotlin - Copy from Set
Kotlin- Sort Set Elements
Kotlin - Reverse a Set
Kotlin - Set Functions
MAP
Kotlin - Map
Kotlin - Iterating Map
Kotlin - Insert in Map
Kotlin - Update Map
Kotlin - Remove from Map
Kotlin - Update Map
Kotlin - Remove from Map
Kotlin - Copy from Map
Kotlin - HashMap
Kotlin - Map Functions
FUNCTION
Kotlin - Function
Kotlin - Function Arguments
Kotlin - Function Overloading
Kotlin - Recursion
Kotlin - Lambda/Anonymous Function
Kotlin - Scope
Kotlin - Import
OOPS
Kotlin - OOPS
Kotlin - Classes & Objects
Kotlin - Constructors
Kotlin - Inheritance
Kotlin - Method Overriding
Kotlin - Abstract Class
Kotlin - Interface
Kotlin - Data Class
Kotlin - Sealed Class
EXCEPTION
Kotlin - Exception Handling
Kotlin - Custom Exception
DATE TIME
Kotlin - Date & Time
REGEX
Kotlin - Regex
Regex - Functions
Regex - Meta-Characters
Regex - Special Sequences
ADVANCED
Kotlin - Operator Overloading
❮❮ PREV
NEXT ❯❯
KOTLIN
-
STRING FUNCTIONS
Functions to handle Strings
You can check the individual methods by clicking on it.
Note :
Function/Function is a topic that will be discussed in a separate tutorial. For now, you can consider, a Function/Function is something that is dedicated to do some specific work.
Function
Description
split()
Used to split a string based on the value provided
toLowerCase()
Used to convert all the letters of a String to lower case
toUpperCase()
Used to convert all the letters of a String to upper case
replace()
Used to replace a String with some other String
repeat()
Used to repeat a String a few number of times
contains()
Used to check if a substring is present in a given String
indexOf()
Used to find the position of a substring in a String
compareTo()
Used to compare two String and returns -ve, 0 and +ve
trim()
Used to remove leading and trailing whitespace from a String
capitalize()
Used to convert the first characer of the String to upper case
format()
Used to present the string in a proper format
startsWith()
Used to check if a String starts with a specific substring
endsWith()
Used to check if a String ends with a specific substring
strip()
Used to trim a string. Deprecated.
stripTrailing()
Used to return right trim String. Deprecated.
stripLeading()
Used to return left trim String. Deprecated.
subSequence()
Used to return a new string starting from the start and end index
❮❮ PREV
NEXT ❯❯