mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-02 04:48:49 -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
|
||
|
```
|