Welcome To Golang By Example

Menu
  • Home
  • Blog
  • Contact Us
  • Support this website
Menu

Category: Tech

Replace a character with another in a string in Go (Golang)

Posted on March 16, 2020March 16, 2020 by admin

Overview In GO string are UTF-8 encoded. strings package of GO provides a Replace method that can be used to replace a character with another in a given string. It returns a…

Replace some instances of a substring with another in Go (Golang)

Posted on March 16, 2020March 16, 2020 by admin

Overview In GO string are UTF-8 encoded. strings package of GO provides a Replace method that can be used to replace some non-overlapping instances of a given substring with a new substring….

Replace all instances of a substring with another in Go (Golang)

Posted on March 16, 2020March 16, 2020 by admin

Overview In GO string are UTF-8 encoded. strings package of GO provides a ReplaceAll method that can be used to replace all non-overlapping instances of a given substring with a new substring….

Find the index of the first instance of a substring in Go (Golang)

Posted on March 12, 2020March 12, 2020 by admin

Overview In GO string are UTF-8 encoded. strings package of GO provides an Index method that can be used to get the index of the first occurrence of a substring in a…

Count instances of substring in a string in Go (Golang)

Posted on March 12, 2020March 12, 2020 by admin

Overview In GO string are UTF-8 encoded. strings package of GO provides a Count method that can be used to get the number of non-overlapping instances of a substring in a particular…

Trim leading and trailing whitespaces from a string in Go (Golang)

Posted on March 11, 2020March 11, 2020 by admin

Overview In GO string are UTF-8 encoded. strings package of GO provides a TrimSpace method that can be used to remove the leading and trailing whitespaces. Also, note that this function returns…

Trim suffix of a string in Go (Golang)

Posted on March 11, 2020March 11, 2020 by admin

Overview In GO string are UTF-8 encoded. strings package of GO provides a TrimSuffix method that can be used to remove a suffix string from the input string. If the input string…

Trim prefix of a string in Go (Golang)

Posted on March 11, 2020March 11, 2020 by admin

Overview In GO string are UTF-8 encoded. strings package of GO provides a TrimPrefix method that can be used to remove a prefix string from the input string. If the input string…

Capitalize a string in Go (Golang)

Posted on March 11, 2020March 11, 2020 by admin

Overview In Golang string are UTF-8 encoded. strings package of go provides a Title method that can be used to convert all first letters of all words in a sentence as capital….

Convert string to uppercase in Go (Golang)

Posted on March 11, 2020March 11, 2020 by admin

Overview In Glang string are UTF-8 encoded. strings package of go language provides a ToUpper method that can be used to convert all Unicode letters to their upper case. This method will…

Posts pagination

Previous 1 … 46 47 48 … 62 Next
Follow @golangbyexample

Popular Articles

Golang Comprehensive Tutorial Series

All Design Patterns in Go (Golang)

Slice in golang

Variables in Go (Golang) – Complete Guide

OOP: Inheritance in GOLANG complete guide

Using Context Package in GO (Golang) – Complete Guide

All data types in Golang with examples

Understanding time and date in Go (Golang) – Complete Guide

©2025 Welcome To Golang By Example | Design: Newspaperly WordPress Theme