String utils
npm install stringfuString manipulation and conversion functions including for working with bytes/hex strings.
Warning: This sofware is under construction and in pre-alpha state.
``js
import { reverseBytes } from 'stringfu';
console.log(reverseBytes('0FAB03')); // 03AB0F
`
#### Table of Contents
- leftPad
- Parameters
- rightPad
- Parameters
- toBytes
- Parameters
- fromBytes
- Parameters
- reverseBytes
- Parameters
- containsOnly
- Parameters
- isInteger
- Parameters
- splitWidth
- Parameters
- isWhitespace
- Parameters
- isAlphaNumeric
- Parameters
Takes a string and makes it length, left-padded with padChar
#### Parameters
- str string length
- number padChar
- string
Takes a string and makes it length, right-padded with spaces
#### Parameters
Takes a hex string and returns Uint8Array of bytes
#### Parameters
- str string
Takes an array of bytes and returns them as a string
#### Parameters
- bytes Uint8Array
Takes a string of hexadecimal and returns a string with the bytes reversed
#### Parameters
- str string
Returns true if string only contains nominated chars
#### Parameters
- str string String to checkchars
- string Chars to test with
Returns true if string represents an integer number
#### Parameters
- str string String to check
Return a string as an array split at lineWidth chars
#### Parameters
- str string String to checklineWidth
- number Make lines this width
Returns Array<string> Array of strings
Checks if string contains only whitespace characters
#### Parameters
- str string String to check
Returns boolean True/false
Checks if string contains only alphanumeric characters
#### Parameters
- str` string String to check
Returns boolean True if only alphanumeric