Add String#repeat method (#67)

This commit is contained in:
Max Graey
2018-04-07 19:59:26 +03:00
committed by Daniel Wirtz
parent f1b00c90be
commit b7ef21950b
8 changed files with 897 additions and 62 deletions

5
std/portable.d.ts vendored
View File

@ -247,12 +247,16 @@ declare class Float32Array extends Array<f32> {}
declare class Float64Array extends Array<f64> {}
declare class String {
static fromCharCode(ls: i32, hs?: i32): string;
static fromCharCodes(arr: u16[]): string;
static fromCodePoint(cp: i32): string;
static fromCodePoints(arr: i32[]): string;
readonly length: i32;
private constructor();
indexOf(subject: string, position?: i32): i32;
includes(other: string): bool;
lastIndexOf(subject: string, position?: i32): i32;
@ -262,6 +266,7 @@ declare class String {
startsWith(subject: string): bool;
endsWith(subject: string): bool;
replace(search: string, replacement: string): string;
repeat(count?: i32): string;
toString(): string;
}