Skip to content

Commit 1c5c7a4

Browse files
author
github-actions[bot]
committed
Update API docs for v13.0.0-alpha.3
1 parent e1270cb commit 1c5c7a4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

data/api/v13.0.0/stdlib.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2427,9 +2427,9 @@
24272427
"kind": "value",
24282428
"name": "compare",
24292429
"docstrings": [
2430-
"`compare(collator, a, b)` compares two strings using the rules of `collator`. Returns a negative number when `a` comes before `b`, `0` when equal, and a positive number otherwise.\n\n## Examples\n\n```rescript\nlet collator = Intl.Collator.make(~locales=[\"en-US\"])\ncollator->Intl.Collator.compare(\"apple\", \"banana\") < 0\n```"
2430+
"`compare(collator, a, b)` compares two strings using the rules of `collator`. Returns a negative number when `a` comes before `b`, `0` when equal, and a positive number otherwise.\n\n## Examples\n\n```rescript\nlet collator = Intl.Collator.make(~locales=[\"en-US\"])\nOrdering.isLess(collator->Intl.Collator.compare(\"apple\", \"banana\"))\n```"
24312431
],
2432-
"signature": "let compare: (t, string, string) => int"
2432+
"signature": "let compare: (t, string, string) => Ordering.t"
24332433
},
24342434
{
24352435
"id": "Stdlib.Intl.Collator.ignore",
@@ -5984,9 +5984,9 @@
59845984
"kind": "value",
59855985
"name": "localeCompare",
59865986
"docstrings": [
5987-
"`localeCompare(referenceStr, compareStr)` returns a float than indicatings\nwhether a reference string comes before or after, or is the same as the given\nstring in sort order. If `referenceStr` occurs before `compareStr` positive if\nthe `referenceStr` occurs after `compareStr`, `0` if they are equivalent.\nDo not rely on exact return values of `-1` or `1`\nSee [`String.localeCompare`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare) on MDN.\n\n## Examples\n\n```rescript\nString.localeCompare(\"a\", \"c\") < 0.0 == true\nString.localeCompare(\"a\", \"a\") == 0.0\n```"
5987+
"`localeCompare(referenceStr, compareStr, ~locales=?, ~options=?)` returns a float indicating\nwhether a reference string comes before or after, or is the same as the given\nstring in sort order. Returns a negative value if `referenceStr` occurs before `compareStr`,\npositive if `referenceStr` occurs after `compareStr`, `0` if they are equivalent.\nDo not rely on exact return values of `-1` or `1`.\n\nOptionally takes `~locales` to specify locale(s) and `~options` to customize comparison behavior\n(e.g., sensitivity, case ordering, numeric sorting). These correspond to the `Intl.Collator` options.\nSee [`String.localeCompare`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare) on MDN.\n\n## Examples\n\n```rescript\nString.localeCompare(\"a\", \"c\") < 0.0 == true\nString.localeCompare(\"a\", \"a\") == 0.0\nString.localeCompare(\"a\", \"b\", ~locales=[\"en-US\"]) < 0.0 == true\nString.localeCompare(\"a\", \"A\", ~locales=[\"en-US\"], ~options={sensitivity: #base}) == 0.0\n```"
59885988
],
5989-
"signature": "let localeCompare: (string, string) => float"
5989+
"signature": "let localeCompare: (\n string,\n string,\n ~locales: array<string>=?,\n ~options: Intl_Collator.options=?,\n) => float"
59905990
},
59915991
{
59925992
"id": "Stdlib.String.ignore",

0 commit comments

Comments
 (0)