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