- Trending Categories
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
Syed Abeed has Published 40 Articles

Syed Abeed
493 Views
Golang has a built-in string function called ContainsAny() that we can use to check whether a specified string is present in a given string or not.ContainsAny() is completely different from Contains().Contains() is used to detect if a string contains a substring.ContainsAny() is used to detect if a string contains any ... Read More

Syed Abeed
3K+ Views
Title() is a built-in function of strings package in Golang that is used to convert a string into Title Case. It converts the first character of each word in a given string into uppercase and returns the modified string.Syntaxfunc Title(s string) stringWhere s is the given string.Example 1Let us consider ... Read More

Syed Abeed
796 Views
strings.SplitAfter() is a built-in function in Golang that is used to break a string into a slice. SplitAfter is different from other Split functions. Here, we slice a given string into substrings after each instance of separators and it returns a slice of those substrings.Syntaxfunc SplitAfter(S String, sep string) []stringWhere ... Read More

Syed Abeed
485 Views
strings.SplitN() is a built-in function in Golang that is used to split a given string into substrings by the given separator. It returns the slices of the substrings between those separators.Syntaxfunc SplitN(str, sep string, n int) []stringWhere, str is the given input string, sep is the separator string, andn defines the ... Read More

Syed Abeed
6K+ Views
strings.Split() is used to break a string into a list of substrings using a specified delimiter. It returns the substrings in the form of a slice.SyntaxThe syntax of strings.Split() is as follows −func Split(S string, sep string) []stringWhere s is the given string and sep is the delimiter (separator) string. ... Read More

Syed Abeed
1K+ Views
strings.Repeat() is a built-in function in Golang that is used to repeat a string for a specified number of times. It returns a new string which consists of a new count of copies of the given string.SyntaxIts syntax is as follows −func Repeat(s string, count int) stringWhere s is the ... Read More

Syed Abeed
2K+ Views
LastIndex() is a built-in function of strings package in Golang. This function is used to check the index of the last occurrence of a specified substring in a given original string. If the substring is found in the given string, then it returns its index position, starting from 0; otherwise ... Read More

Syed Abeed
907 Views
The simplest way to concatenate two strings in Golang is to use the "+" operator. For example, Example 1package main import ( "fmt" ) func main() { str1 := "Hello..." str2 := "How are you doing?" fmt.Println("1st String:", str1) fmt.Println("2nd String:", ... Read More

Syed Abeed
116 Views
IndexByte() is an inbuilt function of strings package in Golang. This function returns the index of the first occurrence of a character in a given string. If the character is found, then it returns its index, starting from 0; else it returns "-1".Syntaxfunc IndexByte(str string, chr byte) intWhere, str – ... Read More

Syed Abeed
141 Views
strings.IndexAny is a built-in function in Golang which is used to get the index of the first instance of any Unicode code point from the input substring. If the substring is found, it returns the position starting from 0; else it returns -1.Syntaxfunc IndexAny(s, chars string) intWhere, s – The original ... Read More