https://github.com/hashicorp/terraform/blob/master/lang/functions.go#L126 shows that Terraform's Trimprefix comes directly from the standard go library. When prefix is absent in the go standard library, the original string is returned; https://golang.org/pkg/strings/#TrimPrefix.
* lang/funcs: Add `trim*` functions