docs/content/en/functions/strings/HasPrefix.md
raw| 1 | --- |
| 2 | title: strings.HasPrefix |
| 3 | description: Reports whether the given string begins with the given prefix. |
| 4 | categories: [] |
| 5 | keywords: [] |
| 6 | params: |
| 7 | functions_and_methods: |
| 8 | aliases: [hasPrefix] |
| 9 | returnType: bool |
| 10 | signatures: [strings.HasPrefix STRING PREFIX] |
| 11 | aliases: [/functions/hasprefix,/functions/strings.hasprefix] |
| 12 | --- |
| 13 | |
| 14 | ```go-html-template |
| 15 | {{ hasPrefix "Hugo" "Hu" }} → true |
| 16 | ``` |