30秒学会 Golang 片段 – Concat
Concatenates two slices. Implement an appropriate function for each type. Use append() and the fact ...
Concatenates two slices. Implement an appropriate function for each type. Use append() and the fact ...
Removes HTML/XML tags from string. Use a regular expression to remove HTML/XML tags from a string.
Negates a predicate function. Take a predicate function and apply the not operator (!) to it with it...
Splits values into two groups according to a function, which specifies which group an element in the...
Maps a number from one range to another range. Returns n mapped between outMin–outMax from inM...
Renders a <textarea> element that uses a callback function to pass its value to the parent com...
Removes falsey values from a list. Use filter() to filter out falsey values (False, None, 0, and “”)...
Converts a string to camelcase. Use String.replaceAllMapped() to break the string into words and cap...
Calculates the Hamming distance between two values. Use the XOR operator (^) to find the bit differe...
Converts a comma-separated values (CSV) string to a 2D array of objects. The first row of the string...