Fix typos in calculation functions and add missing function (#22614)

This commit is contained in:
samrg472
2018-01-03 00:43:32 -08:00
committed by Mohamed Hegazy
parent 2495d307b0
commit 979f91a2e6

View File

@@ -120,12 +120,17 @@ declare class ByteBuffer
/**
* Calculates the number of UTF8 bytes of a string.
*/
static calculateUTF8Byte( str: string ): number;
static calculateUTF8Bytes( str: string ): number;
/**
* Calculates the number of UTF8 characters of a string.JavaScript itself uses UTF- 16, so that a string's length property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF.
*/
static calculateUTF8Char( str: string ): number;
static calculateUTF8Chars( str: string ): number;
/**
* Calculates the number of UTF8 bytes of a string. This is an alias of ByteBuffer#calculateUTF8Bytes.
*/
static calculateString( str: string ): number;
/**
* Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer.