hugo/docs/content/en/functions/strings/HasPrefix.md
2023-10-20 09:43:56 +02:00

24 lines
523 B
Markdown

---
title: strings.HasPrefix
description: Reports whether a string begins with prefix.
categories: [functions]
keywords: []
menu:
docs:
parent: functions
function:
aliases: [hasPrefix]
returnType: bool
signatures: [strings.HasPrefix STRING PREFIX]
relatedFunctions:
- strings.Contains
- strings.ContainsAny
- strings.ContainsNonSpace
- strings.HasPrefix
- strings.HasSuffix
aliases: [/functions/hasprefix,/functions/strings.hasprefix]
---
```go-html-template
{{ hasPrefix "Hugo" "Hu" }} → true
```