Constructors
constructor
- new BitString(): BitString
-
- new BitString(initialValue: number): BitString
-
- new BitString(initialValue: number, type: BitStringType): BitString
-
- new BitString(initialValue: string): BitString
-
- new BitString(initialValue: string, radix: number): BitString
-
Parameters
-
initialValue: string
-
radix: number
- new BitString(initialValue: string, type: BitStringType): BitString
-
Accessors
HEX
- get HEX(): string
-
Returns string
Length
- get Length(): number
-
Returns number
Methods
AnyBit
- AnyBit(): boolean
-
Returns boolean
Clone
- Clone(): BitString
-
Equals
- Equals(another: BitString): boolean
-
Returns boolean
GetBit
- GetBit(offset: number, defaultVal?: boolean): boolean
-
Parameters
-
offset: number
-
defaultVal: boolean = false
Returns boolean
LeftRotate
- LeftRotate(n: number, bits?: number): BitString
-
Parameters
-
n: number
-
bits: number = 64
LeftShift
- LeftShift(n: number): BitString
-
NOT
- NOT(): BitString
-
Reflect
- Reflect(bits?: number): BitString
-
RightRotate
- RightRotate(n: number, bits?: number): BitString
-
Parameters
-
n: number
-
bits: number = 64
RightShift
- RightShift(n: number): BitString
-
SetBit
- SetBit(offset: number, val: boolean): BitString
-
Parameters
-
offset: number
-
val: boolean
SetLength
- SetLength(bits: number): BitString
-
Swap
- Swap(bytes?: number): BitString
-
ToBytes
- ToBytes(bits?: number): number[]
-
Returns number[]
ToNumber
- ToNumber(): number
-
Returns number
toString
- toString(type?: BitStringType, trim?: boolean): string
-
Returns string
Static
FromBytes
- FromBytes(...bytes: number[]): BitString
-
Static
Initialize2d
- Initialize2d(x: number, y: number): BitString[][]
-
Version
1.0.0
Since
1.0.5