An open API service indexing awesome lists of open source software.

https://github.com/softcircuits/numbertotext

Converts a number to text. For example, converts 123.45 to "One hundred twenty-three and 45/100".
https://github.com/softcircuits/numbertotext

check-writing number-format number-formatter number-to-words

Last synced: about 1 year ago
JSON representation

Converts a number to text. For example, converts 123.45 to "One hundred twenty-three and 45/100".

Awesome Lists containing this project

README

          

# NumberToText

[![NuGet version (SoftCircuits.NumberToText)](https://img.shields.io/nuget/v/SoftCircuits.NumberToText.svg?style=flat-square)](https://www.nuget.org/packages/SoftCircuits.NumberToText/)

```
Install-Package SoftCircuits.NumberToText
```

## IMPORTANT

**This repository has been deprecated. Please use SoftCircuits.Wordify instead.**

## Overview

Converts a number to text. For example, the library would convert `123.45` to `"One hundred twenty-three and 45/100"`. Useful for check printing or other cases where you want to display a number as text.

## Example

```cs
NumberToText converter = new NumberToText();
string s = converter.Transform(123.45);
```

Note that negative numbers are converted to positive numbers before transforming. Therefore, `123.45` would product the same result for as for `-123.45`. Depending on how you want negative numbers handled, you could prefix the result with `"Minus"` or something to that effect when the value is a negative number.

## Additional Information

For additional information, check the [Converting Numbers to Words](http://www.blackbeltcoder.com/Articles/strings/converting-numbers-to-words) article on Black Belt Coder.