What is a repository? You can simply understand it as a directory. All files in this directory can be managed by Git. Git can track the modification and deletio...
We know that by default, Markdown inserts the table, the contents of the cells are left-aligned by default; the contents of the header cells will always be cent...
The earliest Git was developed on Linux. For a long time, Git can only be run on Linux and Unix systems. However, slowly someone ported it to Windows. Now, Git ...
What is Git? Git is currently the world's most advanced distributed version control system (no one). What are the characteristics of Git? Simply put: high-end a...
Why write this tutorial? Because in the process of learning Git, I bought books, and also Googled a bunch of Git-related articles and tutorials on the Internet,...
``` strings.Contains(s, substr string) bool ``` For example ``` package main import ( "fmt" "strings" ) func main() { fmt.Println(strings.Contains("seafood", "f...
strings.Count(s, sep string) int Get the number of occurrences of parameter sep in parameter s. If the parameter sep is empty, the length of the parameter s is ...
strings.Split strings.Split(s, sep string) []string Use the parameter sep as the delimiting string to separate the parameter s, and return a string array. For e...
syntax strings.Replace(s, old, new string, n int) string The parameter n indicates the number of replacements, less than 0 indicates unlimited times. For exampl...
func ToLower strings.ToLower(s string) string ToLower returns a copy of the string s where all Unicode letters are mapped to uppercase letters. For example pack...
func ToUpper strings.ToUpper(s string) string ToLower returns a copy of the string s where all Unicode letters are mapped to uppercase letters. For example pack...
func Trim strings.Trim(s string, cutset string) string Trim returns a part of a string s, which deletes all the first and last characters contained in the cutse...
func Index strings.Index(s, sep string) int Index returns the index of the first instance of sep in s; if sep does not exist in s, it returns -1. For example pa...
Three common methods of golang string comparison Self-built method "==", case sensitive, the easiest way Compare function, case sensitive Compare whether the UT...
Go language clearly does not support ternary expressions, here is the relevant discussion: https://groups.google.com/d/msg/golang-nuts/dbyqx_LGUxM/tLFFSXSfOdQJ ...