NonBlankStringModule
PackageReified.Refinements
Operations over text known to carry non-whitespace content.
Summary
| Name | Signature | Synopsis |
|---|---|---|
| refinement | refinement | No description available. |
| value | value input | Returns the underlying string value. |
| create | create value | Admits text that is not null, empty, or whitespace. |
| map | map mapping input | Applies a mapping and re-admits the result, which may no longer be inhabited. |
| append | append left right | Concatenates two inhabited strings. |
| join | join separator values | Concatenates with a separator. |
| trim | trim input | Trims surrounding whitespace. |
| toUpper | toUpper input | Converts to upper case. |
| toLower | toLower input | Converts to lower case. |
| length | length input | Returns the length as a plain int, matching String.length. |
| split | split separator input | Splits on a separator, discarding blank segments. |
Returns the underlying string value.
Parameters
| Name | Type | Description |
|---|---|---|
| input | NonBlankString |
Returns
string
Admits text that is not null, empty, or whitespace.
Parameters
| Name | Type | Description |
|---|---|---|
| value | string |
Returns
Result<NonBlankString, Violation>
Applies a mapping and re-admits the result, which may no longer be inhabited.
Parameters
| Name | Type | Description |
|---|---|---|
| mapping | string -> string | |
| input | NonBlankString |
Returns
Result<NonBlankString, Violation>
Concatenates two inhabited strings. Total — the result is still inhabited.
Parameters
| Name | Type | Description |
|---|---|---|
| left | NonBlankString | |
| right | NonBlankString |
Returns
NonBlankString
Concatenates with a separator. Total.
Parameters
| Name | Type | Description |
|---|---|---|
| separator | string | |
| values | NonEmptyList<NonBlankString> |
Returns
NonBlankString
Trims surrounding whitespace. Total — trimming inhabited text leaves it inhabited.
Parameters
| Name | Type | Description |
|---|---|---|
| input | NonBlankString |
Returns
NonBlankString
Converts to upper case. Total.
Parameters
| Name | Type | Description |
|---|---|---|
| input | NonBlankString |
Returns
NonBlankString
Converts to lower case. Total.
Parameters
| Name | Type | Description |
|---|---|---|
| input | NonBlankString |
Returns
NonBlankString
Returns the length as a plain
int, matching String.length.Parameters
| Name | Type | Description |
|---|---|---|
| input | NonBlankString |
Returns
int