spiegel-keyman/web/docs/engine/reference/interface/_nul.md
Marc Durdin 1f82507730 docs(web): deprecate unused and obsolete API endpoints and docs cleanup
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
2026-08-12 16:07:22 +02:00

42 lines
815 B
Markdown

---
title: nul (KN)
---
## Summary
[`nul`](/developer/language/reference/nul) context check: Returns `true` if the length of the [`context`](/developer/language/reference/context) is less than or equal to `n` characters.
## Syntax
```js
keyman.interface.nul(n, Pelem);
```
or
```js
KeymanWeb.KN(n, Pelem); // Shorthand
```
### Parameters
`n`
: Type: `number`
: The length of `context` to check.
`Pelem`
: Type: `Element`
: The element whose `context` is being examined.
### Return Value
`boolean`
: `true` if the context is not longer than `n` characters, otherwise `false`.
## Description
This is of particular use in handling the [Developer rule `nul`](/developer/language/reference/nul) and is subject to the caveats listed therein.
## See also
- [`keyman.interface.context()`](context)