name: Text

description: This is a string wrapper, along with the length. It is used both for strings as well as items such as documentation. It simply extends the standard JS String built-in object, inheriting all methods exposed from String.

Hierarchy

String

↳ Text

↳ Type

Implements

Indexable

[index: number]: string

Constructors

constructor

⊕ new Text(value?: Text | string | AnyU8a | object): Text

Defined in Text.ts:23

Parameters:

Name Type Default value
Default value value Text string AnyU8a object ""

Returns: Text


Properties

<Static> String

● String: StringConstructor

Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:517

Allows manipulation and formatting of text strings and determination and location of substrings within strings.


Accessors

encodedLength

getencodedLength(): number

Defined in Text.ts:45

description: The length of the value when encoded as a Uint8Array

Returns: number


length

getlength(): number

Overrides String.length

Defined in Text.ts:52

description: The length of the value

Returns: number


Methods

eq

▸ eq(other?: any): boolean

Implementation of Codec.eq

Defined in Text.ts:60

description: Compares the value of the input to see if there is a match

Parameters:

Name Type
Optional other any

Returns: boolean


toHex

▸ toHex(): string

Implementation of Codec.toHex

Defined in Text.ts:69

description: Returns a hex string representation of the value

Returns: string


toJSON

▸ toJSON(): any

Implementation of Codec.toJSON

Defined in Text.ts:76

description: Converts the Object to JSON, typically used for RPC transfers

Returns: any


toString

▸ toString(): string

Implementation of Codec.toString

Overrides String.toString

Defined in Text.ts:83

description: Returns the string representation of the value

Returns: string


toU8a

▸ toU8a(isBare?: undefined | false | true): Uint8Array

Implementation of Codec.toU8a

Defined in Text.ts:92

description: Encodes the value as a Uint8Array as per the parity-codec specifications

Parameters:

Name Type Description
Optional isBare undefined false true true when the value has none of the type-specific prefixes (internal)

Returns: Uint8Array


results matching ""

    No results matching ""