Golang Project Structure

Tutorials, tips and tricks for writing and structuring code in Go (with additional content for other programming languages)

strings

Tag

Removing a Substring From a String in Go

A hand holding a pair of scissors.

In this blog post, we will explore several approaches that can be used to remove a substring from a larger string in Go, covering both basic cases and more complex scenarios. By the end of this guide, you should have a solid understanding of various ways to strip substrings from strings in Go and how […]

Discovering Whether One String Contains Another in Go

Five pieces of string arranged in a circular ring. Four of the rings of string each contain another ring of string.

When working with strings in Go, one common task is checking whether one string contains another. While this may seem straightforward, Go offers several methods, each with varying levels of complexity depending on the needs of your application. Whether you’re performing a case-sensitive substring search, looking for the index of a substring or diving into […]

Reversing a String

This post will look at various ways to reverse a string in Go, a fairly common task that isn’t explicitly handled by the standard library. We will start by looking at some basic examples using Java and the Linux command line, then we will go through various ways to code solutions to the problem in […]