File: to_number.md

package info (click to toggle)
jsoncons 1.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 17,584 kB
  • sloc: cpp: 136,382; sh: 33; makefile: 5
file content (18 lines) | stat: -rw-r--r-- 271 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
### to_number

```
number to_number(string|number value)
```

If string, returns the parsed number. 
If number, returns the passed in value.

It is a type error if

- the provided value is not a string or number

- the string cannot be parsed as a number

### Examples