Overview In GO string are UTF-8 encoded. strings package of GO provides a ToLower method that can be used to convert all Unicode letters to their lower case. This method will return…
Author: admin
Check if a string ends with a suffix in Go (Golang)
Overview In GO string are UTF-8 encoded. strings package of GO provides a HasSuffix method that can be used to check if a string ends with a certain suffix Below is the…
Check if string begins with a prefix in Go (Golang)
Overview In GO string are UTF-8 encoded. strings package of GO provides a HasPrefix method that can be used to check if a string begins with a certain prefix Below is the…
Join a string by delimiter or a separator in Go (Golang)
Overview In GO string are UTF-8 encoded. strings package of GO provides a Join method that can be used to join a string based upon a delimiter. Below is the signature of…
Get all words from a sentence in GO (Golang)
Overview In GO string are UTF-8 encoded. strings package of GO provides a Fields method that can be used to split a string around an instance of one or more consecutive white…
Split a string in Go(Golang)
Overview In Golang string are UTF-8 encoded. strings package of GO provides a Split method that can be used to split a string by a separator. Below is the signature of the…
Check if a string contains another string in Go (Golang)
Overview In Golang string are UTF-8 encoded. strings package of GO provides a Contains method that can be used to check if a particular string is a substring of another string. Below…
string compare in Go (Golang)
Overview In Golang string are UTF-8 encoded. strings package of GO provides a Compare method that can be used to compare two strings in Go. Note that this method compares strings lexicographically….
Understand /etc/paths file and /etc/paths.d directory on MAC
MAC OS uses /etc/paths file and /etc/paths.d directory for setting up the value of PATH env varialb.e. A utility path_helper is used to set the PATH env variable based on the content…
Installing GO (aka Golang) on Windows
GO is available to be installed on Win, Mac, and Linux platforms. Let’s see the installation set up for Windows Install Download the .msi installer from here – https://golang.org/dl/. Double click the…