[Golang] Trim Prefix or Suffix from String


Trim/Remove Prefix

Q: How to trim leading samma from sammadiṭṭhi?

A: Use TrimPrefix function in strings package

result := strings.TrimPrefix("sammadiṭṭhi", "samma")

See here for official example of TrimPrefix.