- Source:
Methods
(static) getArray(src, encopt) → {Array.<BytesLine>}
get array of BytesLine.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
src |
string | Buffer | |||
enc |
string |
<optional> |
UTF-8 | encoding. |
- Source:
Returns:
- Type
- Array.<BytesLine>
(static) isBytesLine() → {Boolean}
- Source:
Returns:
- Type
- Boolean
(abstract) append() → {Number}
- Inherited From:
- Source:
Returns:
- return number of leadingCode dropped.
- Type
- Number
dropLeadingCode(leadingCode) → {Number}
trim leadingCode and return the number trimed.
Parameters:
| Name | Type | Description |
|---|---|---|
leadingCode |
number | charCode |
- Overrides:
- Source:
Returns:
- the number of trimed leadingCode
- Type
- Number
getStringContent() → {string}
- Overrides:
- Source:
Returns:
- return string present of this BytesLine.
- Type
- string
isEmpty() → {Boolean}
if content and separator are both empty, is empty.
- Source:
Returns:
- Type
- Boolean
isTagLine(startTag, endTag) → {Boolean}
test is this object is a tagLine.
Parameters:
| Name | Type | Description |
|---|---|---|
startTag |
string | Regex | |
endTag |
string | Regex |
- Inherited From:
- Source:
Returns:
- Type
- Boolean
isWhiteLine() → {Boolean}
if all of content are white character, return true.
- Overrides:
- Source:
Returns:
- Type
- Boolean
(abstract) prepend() → {Number}
- Overrides:
- Source:
Returns:
- return number of leadingCode dropped.
- Type
- Number
toBuffer() → {Buffer}
- Source:
Returns:
- convert this BytesLine to Buffer. Include content and separator.
- Type
- Buffer