rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
58 lines (28 loc) • 993 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [rc-js-util](./rc-js-util.md) > [stringNormalizeNullUndefinedToEmpty](./rc-js-util.stringnormalizenullundefinedtoempty.md)
## stringNormalizeNullUndefinedToEmpty() function
Replaces `null` / `undefined` with an empty `string`<!-- -->.
**Signature:**
```typescript
export declare function stringNormalizeNullUndefinedToEmpty(input: string | null | undefined): string;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
input
</td><td>
string \| null \| undefined
</td><td>
</td></tr>
</tbody></table>
**Returns:**
string
`input` if it's a `string` of length greater than 0, otherwise an empty `string`<!-- -->.
## Remarks
See [stringNormalizeNullUndefinedToEmpty()](./rc-js-util.stringnormalizenullundefinedtoempty.md)<!-- -->.