Skip to content

Latest commit

 

History

History
153 lines (116 loc) · 3.17 KB

File metadata and controls

153 lines (116 loc) · 3.17 KB
layout menu_item title description return_to sections
default
api
Oid
Version 0.26.1
API Documentation Index
/api/
fromString #cmp #cpy #equal #isZero #iszero #ncmp #strcmp #streq #tostrS
#fromString
#cmp
#cpy
#equal
#isZero
#iszero
#ncmp
#strcmp
#streq
#tostrS

Oid.fromString Sync

var oid = Oid.fromString(str);
Parameters Type
str String input hex string; must be null-terminated.
Returns
Oid oid structure the result is written into.

Oid#cmp Sync

var result = oid.cmp(b);

| Parameters | Type | | --- | --- | --- | | b | Oid | second oid structure. |

Returns
Number
<
0, 0, >0 if a
<
b, a == b, a > b.

Oid#cpy Sync

var oid = oid.cpy();
Returns
Oid oid structure the result is written into.

Oid#equal Sync

var result = oid.equal(b);

| Parameters | Type | | --- | --- | --- | | b | Oid | second oid structure. |

Returns
Number true if equal, false otherwise

Oid#isZero Sync

var result = oid.isZero();
Returns
Number 1 if all zeros, 0 otherwise.

Oid#iszero Sync

var result = oid.iszero();
Returns
Number

Oid#ncmp Sync

var result = oid.ncmp(b, len);

| Parameters | Type | | --- | --- | --- | | b | Oid | second oid structure. | | len | Number | the number of hex chars to compare |

Returns
Number 0 in case of a match

Oid#strcmp Sync

var result = oid.strcmp(str);

| Parameters | Type | | --- | --- | --- | | str | String | input hex string of an object id. |

Returns
Number -1 if str is not valid,
<
0 if id sorts before str,
     0 if id matches str, >0 if id sorts after str. |

Oid#streq Sync

var result = oid.streq(str);

| Parameters | Type | | --- | --- | --- | | str | String | input hex string of an object id. |

Returns
Number 0 in case of a match, -1 otherwise.

Oid#tostrS Sync

var string = oid.tostrS();
Returns
String the c-string