hugo/docs/content/en/functions/strings.HasPrefix.md
2023-05-22 16:47:07 +02:00

16 lines
363 B
Markdown

---
title: strings.HasPrefix
description: Tests whether a string begins with prefix.
categories: [functions]
menu:
docs:
parent: functions
keywords: [strings]
signature: ["hasPrefix STRING PREFIX","strings.HasPrefix STRING PREFIX"]
relatedfuncs: [hasSuffix]
aliases: [/functions/hasprefix/]
---
```go-html-template
{{ hasPrefix "Hugo" "Hu" }} → true
```