|
Implement the bulk of string.rs shims:
- sprintf() with flags/width/precision/positional args for the common
conversions (s/d/u/b/o/x/X/c/f/F)
- pack()/unpack() for the C/c/n/v/N/V (+ s/S/i/I unpack) format codes
- base64_encode()/base64_decode() (non-strict)
- substr_replace, str_bitand, chr, hexdec, stripcslashes, addcslashes,
number_format (round-half-away-from-zero), uniqid, strip_tags,
html_entity_decode, iconv (UTF-8/ASCII identity)
%e/%E/%g/%G, wordwrap, sscanf, php_strip_whitespace and non-UTF-8 iconv
remain TODO(phase-d) (exact float-exponent/tokenizer/encoding-table
behavior not yet ported). Divergences in ported functions are noted with
TODO(phase-d) comments.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
Implement array_unique, array_splice, array_merge_recursive, krsort,
ksort, asort, sort_with_flags and sort_natural_flag_case, plus the
strnatcmp/strnatcasecmp port they rely on. Drop array_key_last and
array_splice_mixed in favour of existing helpers at the call sites.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|