mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
16 lines
363 B
Markdown
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
|
|
```
|