title: Golang: Strings Trim Function
body: <p>I used <code>strings.Trim()</code> in Golang to trim the first five characters.<br>
  However, the last "a" is always gone.<br>
  Why is that so? </p>
  
  <p>Example: </p>
  
  <pre><code>sentence := "Kab. Kolaka Utara"
  result := strings.Trim(sentence,sentence[:4])
  fmt.Println(result)
  </code></pre>
  
  <p>Result: <code>Kolaka Utar</code><br>
  I expected: <code>Kolaka Utara</code></p>
  
  <p><a href="https://play.golang.org/p/R6UoKWNaVv" rel="nofollow">https://play.golang.org/p/R6UoKWNaVv</a></p>
  
  <p>Thank you for your help.</p>