mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 18:42:11 -05:00
17 lines
363 B
Markdown
17 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
|
||
|
```
|