mednet.utils.string

String manipulation utilities.

Functions

rewrap(s)

Re-wrap input string to remove all whitespaces.

mednet.utils.string.rewrap(s)[source]

Re-wrap input string to remove all whitespaces.

This function will transform all whitespaces (one or more spaces, tabs, newlines, returns, formfeeds) into a single space on a given string.

Parameters:

s (str) – The input string.

Return type:

str

Returns:

The “re-wrapped” string with multiple whitespaces transformed to a single space.