Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages

kStatus kType_FormatEnumerator | ( | kType | type,
|  | k32s | value,
|  | kChar * | displayName,
|  | kSize | capacity
| ) |  |

Formats an enumerator value to a text buffer using the enumerator display name.

If the enumerator value isn't known, the buffer will receive [D], where D is decimal representation of the enumerator value, and the return value will be kERROR_NOT_FOUND.

Exercise caution when using formatted enumerator names in file formats or communication protocols; enumerator text names may change if the enumerator source code is modified. Consider using explicit and stable format/parse functions, or using numeric values instead.

Parameters

  type | Type.
  value | Enumerator value.
  displayName | Receives formatted enumerator name.
  capacity | Buffer capacity.

Returns
  Operation status (see notes).