package quickjs

  1. Overview
  2. Docs

Module Function_description.FunctionsSource

Parameters

module F : Ctypes.FOREIGN

Signature

Sourceval (@->) : 'a Ctypes.typ -> 'b F.fn -> ('a -> 'b) F.fn

Compile a regular expression pattern into bytecode. Returns pointer to bytecode buffer, or NULL on error with message in error_msg.

Execute a compiled regex against input string. Returns: 1 = match, 0 = no match, -1 = error

Sourceval lre_get_capture_count : (Unsigned.uint8 Ctypes_static.ptr -> int F.return) F.result

Get number of capture groups (including group 0 for full match)

Get pointer to null-terminated group names (via shim)

Get flags from compiled bytecode

Sourceval lre_is_cased : (Unsigned.uint32 -> int F.return) F.result

Check if character has uppercase/lowercase variants (Cased property)

Sourceval lre_is_case_ignorable : (Unsigned.uint32 -> int F.return) F.result

Check if character is ignored during case mapping (Case_Ignorable)

Sourceval lre_is_id_start : (Unsigned.uint32 -> int F.return) F.result

Check if character can start an identifier (ID_Start)

Sourceval lre_is_id_continue : (Unsigned.uint32 -> int F.return) F.result

Check if character can continue an identifier (ID_Continue)

Sourceval lre_is_space : (int -> bool F.return) F.result

Check if character is whitespace (works for all codepoints)

Convert character case. conv_type: 0 = uppercase, 1 = lowercase, 2 = case folding Returns number of output codepoints (1-3)

Sourceval lre_canonicalize : (Unsigned.uint32 -> int -> int F.return) F.result

Canonicalize character for case-insensitive regex matching. is_unicode: 1 = full Unicode folding, 0 = ASCII only

Normalize Unicode string (via C shim that handles allocation). n_type: 0 = NFC, 1 = NFD, 2 = NFKC, 3 = NFKD Returns length of output, or -1 on error

Sourceval unicode_normalize_free : (Unsigned.uint32 Ctypes_static.ptr -> unit F.return) F.result

Free buffer allocated by unicode_normalize_shim

Sourceval js_dtoa_max_len : (float -> int -> int -> int -> int F.return) F.result

Calculate maximum buffer size needed for js_dtoa

Sourceval js_dtoa : (char Ctypes_static.ptr -> float -> int -> int -> int -> unit Ctypes_static.ptr -> int F.return) F.result

Convert double to string with JS semantics. Flags: JS_DTOA_FORMAT_* | JS_DTOA_EXP_* | JS_DTOA_MINUS_ZERO Returns actual string length

Sourceval js_atod : (string -> char Ctypes_static.ptr Ctypes_static.ptr -> int -> int -> unit Ctypes_static.ptr -> float F.return) F.result

Parse string to double with JS semantics (via shim). Flags: JS_ATOD_INT_ONLY | JS_ATOD_ACCEPT_BIN_OCT | etc. Sets *pnext to position after parsed number

Convert unsigned 32-bit integer to decimal string

Convert signed 32-bit integer to decimal string

Convert unsigned 64-bit integer to decimal string

Convert signed 64-bit integer to decimal string

Convert unsigned 64-bit integer to string in given radix (2-36)

Sourceval i64toa_radix : (char Ctypes_static.ptr -> int64 -> int -> Unsigned.size_t F.return) F.result

Convert signed 64-bit integer to string in given radix (2-36)