mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
24 lines
523 B
Markdown
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
|
|
```
|