Check if a String is Uppercase in Golang
The challenge
Create a method IsUpperCase
to see whether the string is ALL CAPS. For example:
type MyString string
MyString("c").IsUpperCase() …
Read Article →
129 articles about go development, tools, and best practices
Create a method IsUpperCase
to see whether the string is ALL CAPS. For example:
type MyString string
MyString("c").IsUpperCase() …
Read Article →
In Go, there are multiple ways to make a string
UpperCase, each of them are by using the strings
package.
strings.ToUpper
):func ToUpper(str …
Given a string of words, return the length of the shortest word(s).
The input string will never be empty and you do not need to account …
Read Article →Your goal is to return multiplication table for number
that is always an integer from 1 to 10.
For example, a multiplication table …
Read Article →Remove the left-most duplicates from a list of integers and return the result.
// Remove the 3's at indices 0 and 3
// followed by …
Read Article →
All we eat is water and dry matter.
John bought potatoes: their weight is 100 kilograms. Potatoes contain water and dry matter.
The …
Read Article →The input is a string str
of digits. Cut the string into chunks (a chunk here is a substring of the initial string) of size sz
(ignore …
Given a month as an integer from 1 to 12, return to which quarter of the year it belongs as an integer number.
For example: month 2 …
Read Article →Golang comes with a decent offering around variables that you can use to store, retrieve and manipulate information.
A variable is defined with the …
Read Article →Every language has it’s ways of converting data types. One of the most common data types to convert between is that of strings (string
) and …
Learning Go or Golang as a Python developer, programmer or software engineer is easier than you think.
While there are quite a lot of things to learn …
Read Article →Atomic operations are commonly used to implement high-performance counters and accumulators:
package main
import ( …