forked from javascript-obfuscator/javascript-obfuscator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStringArray.ts
More file actions
53 lines (46 loc) · 1003 Bytes
/
StringArray.ts
File metadata and controls
53 lines (46 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { Utils } from './Utils';
export class StringArray {
/**
* @type {string[]}
*/
private array: string[] = [];
/**
* @param value
*/
public addToArray (value: string): void {
this.array.push(value);
}
/**
* @returns {string[]}
*/
public getArray (): string[] {
return this.array;
}
/**
* @param value
* @returns {number}
*/
public getIndexOf(value: string): number {
return this.array.indexOf(value);
}
/**
* @returns {number}
*/
public getLength (): number {
return this.array.length;
}
/**
* @param rotationValue
*/
public rotateArray (rotationValue: number): void {
this.array = Utils.arrayRotate(this.array, rotationValue);
}
/**
* @returns {string}
*/
public toString (): string {
return this.array.map((value: string) => {
return `'${value}'`;
}).toString()
}
}