mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-21 07:47:40 +00:00
Deprecate the following obsolete functions and properties: * `keyman.helpURL` * `keyman.util.rgba` * `keyman.util.toFloat` * `keyman.util.toNumber` * `keyman.util.toNzString` Use correct language for code blocks in Keyman Engine for Web documentation. Test-bot: skip
39 lines
630 B
Markdown
39 lines
630 B
Markdown
---
|
|
title: toFloat (deprecated)
|
|
---
|
|
|
|
## Summary
|
|
|
|
Floating conversion with default.
|
|
|
|
## Syntax
|
|
|
|
```js
|
|
keyman.util.toFloat(s, dflt);
|
|
```
|
|
|
|
### Parameters
|
|
|
|
`s`
|
|
: Type: `string`
|
|
: Numeric string.
|
|
|
|
`dflt`
|
|
: Type: `number`
|
|
: Default value if parse is unsuccessful.
|
|
|
|
### Return Value
|
|
|
|
`number`
|
|
: The string's conversion to a numeric value, or the default value if unsuccessful.
|
|
|
|
## Description
|
|
|
|
This is a simple wrapper around `parseFloat` to handle invalid inputs, for which
|
|
`dflt` will be returned instead.
|
|
|
|
This function has been deprecated and will be removed in a future version of KeymanWeb.
|
|
|
|
## History
|
|
|
|
19.0: deprecated
|