conventions.io

Tech Challenge

2026-08-25

🦫

Daily Tech Challenge

Go

medium
Question 1 of 5

What does this Go program print, given where strings.Cut splits and what it returns when the separator is absent?

Example
package main

import (
	"fmt"
	"strings"
)

func main() {
	before, after, found := strings.Cut("key=value=extra", "=")
	fmt.Println(before, after, found)

	b2, a2, f2 := strings.Cut("noseparator", "=")
	fmt.Printf("%q %q %v
", b2, a2, f2)
}

Tuesday, August 25, 2026 · A new challenge drops every day