Skip to content

TokenizedStringFragments

Fragments of a concatenated string containing stringified Tokens.

Initializers

import { TokenizedStringFragments } from '@alicloud/ros-cdk-core'
new TokenizedStringFragments()
Name Type Description

Methods

Name Description
addIntrinsic No description.
addLiteral No description.
addToken No description.
join Combine the string fragments using the given joiner.
mapTokens Apply a transformation function to all tokens in the string.

addIntrinsic

public addIntrinsic(value: any): void

valueRequired

  • Type: any

addLiteral

public addLiteral(lit: any): void

litRequired

  • Type: any

addToken

public addToken(token: IResolvable): void

tokenRequired


join

public join(concat: IFragmentConcatenator): any

Combine the string fragments using the given joiner.

If there are any

concatRequired


mapTokens

public mapTokens(mapper: ITokenMapper): TokenizedStringFragments

Apply a transformation function to all tokens in the string.

mapperRequired


Properties

Name Type Description
firstValue any No description.
length number No description.
tokens IResolvable[] Return all Tokens from this string.
firstToken IResolvable No description.

firstValueRequired

public readonly firstValue: any;
  • Type: any

lengthRequired

public readonly length: number;
  • Type: number

tokensRequired

public readonly tokens: IResolvable[];

Return all Tokens from this string.


firstTokenOptional

public readonly firstToken: IResolvable;