Skip to content

API Reference


API Reference / @dasch-ng/utils / src / UpperFirstPipe

Class: UpperFirstPipe ​

Defined in: libs/ng/utils/src/lib/upper-first.pipe.ts:15

Uppercases the first character with the rules of LOCALE_ID (or the given locale) and leaves the rest unchanged. For "capitalize", combine it with lowercase.

Example ​

html
{{ 'hello world' | upperFirst }}               <!-- Hello world -->
{{ 'HELLO' | lowercase | upperFirst }}         <!-- Hello -->
{{ 'istanbul' | upperFirst: 'tr' }}            <!-- İstanbul -->

Implements ​

  • PipeTransform

Constructors ​

Constructor ​

new UpperFirstPipe(): UpperFirstPipe

Returns ​

UpperFirstPipe

Methods ​

transform() ​

transform(value, locale?): string

Defined in: libs/ng/utils/src/lib/upper-first.pipe.ts:18

Parameters ​

value ​

string | null | undefined

locale? ​

string

Returns ​

string

Implementation of ​

PipeTransform.transform

Released under the MIT License.