rbtools.utils.encoding¶
Utilities for managing string types and encoding.
Functions
| 
 | Force a given string to be a bytes type. | 
| 
 | Force a given string to be a Unicode string type. | 
- rbtools.utils.encoding.force_bytes(string: Union[bytes, str], encoding: str = 'utf-8') bytes[source]¶
- Force a given string to be a bytes type. - Parameters:
- Returns:
- The string as a byte string. 
- Return type:
- Raises:
- ValueError – The given string was not a supported type. 
 
