[RFC] Add grapheme_strrev function#20949
Conversation
Add more tests Arabic for grapheme_strrev function.
b61bac2 to
80e6b92
Compare
|
This RFC is accepted, So ready for review. |
|
There's no rush, Does anyone review this? |
| p = ZSTR_VAL(ret); | ||
|
|
||
| ubrk_setUText(bi, ut, &ustatus); | ||
| pos = ubrk_last(bi); |
There was a problem hiding this comment.
nit: might be worth check in case pos == UBRK_DONE is to "jump to conclusion" to bypass the loop below wdyt ?
There was a problem hiding this comment.
Indeed, I added RETVAL_EMPTY_STRING.
There was a problem hiding this comment.
just one detail, do not forget you allocate ret pointer line 1172.
There was a problem hiding this comment.
it might just simpler to raise the goto label at the 1190 line instead
There was a problem hiding this comment.
I tried add ubrk_end in RETVAL_NEW_STR .
| ubrk_setUText(bi, ut, &ustatus); | ||
| pos = ubrk_last(bi); | ||
| if (pos == UBRK_DONE) { | ||
| RETVAL_EMPTY_STRING(); |
There was a problem hiding this comment.
but then this line looks useless wdyt ?
There was a problem hiding this comment.
Indeed, I remove RETVAL_EMPTY_STRING.
|
Thank you, I'll merge tomorrow(maybe 9am JST) if there is no concern. |
Add grapheme_strrev function.
strrevfor grapheme cluster unit.RFC: https://wiki.php.net/rfc/grapheme_strrev