-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[RFC] Add mb_ucfirst and mb_lcfirst functions #13161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
959f9f5
Add mb_ucfirst and mb_lcfirst functions
youkidearitai d10721c
merge functions
youkidearitai 09a3f9b
Change from zend_string_release to zend_string_release_ex
youkidearitai 55d7de5
Fix mb_ucfirst from MB_CASE_UPPER to MB_CASE_TITLE
youkidearitai 861209f
Add test case to Georgian word to mb_ucfirst
youkidearitai 555eb20
Add NEWS and UPGRADING
youkidearitai 8a007f0
Refactor php_mb_ulcfirst
youkidearitai 7786571
If is not need convert, use zend_string_copy.
youkidearitai 31c6620
Fix zend_string_release
youkidearitai 4472ef1
Fix RETURN_STR instead of RETVAL_STR
youkidearitai e6cc1e2
Improve and optimize variable second move after if statement
youkidearitai aa58c7f
fix a nit
youkidearitai c55d7b2
Add test case for ASCII and SJIS (other encoding)
youkidearitai 216e104
Add test case for longer strings
youkidearitai 7231969
Add test case for EUC-JP
youkidearitai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--TEST-- | ||
mb_ucfirst(), mb_lcfirst functions tests | ||
--EXTENSIONS-- | ||
mbstring | ||
--FILE-- | ||
<?php | ||
mb_internal_encoding("UTF-8"); | ||
echo "== Empty String ==\n"; | ||
var_dump(mb_ucfirst("")); | ||
var_dump(mb_lcfirst("")); | ||
echo "== mb_ucfirst ==\n"; | ||
var_dump(mb_ucfirst("ab")); | ||
var_dump(mb_ucfirst("ABS")); | ||
var_dump(mb_ucfirst("đắt quá!")); | ||
echo "== mb_lcfirst ==\n"; | ||
var_dump(mb_lcfirst("ABS")); | ||
var_dump(mb_lcfirst("Xin chào")); | ||
var_dump(mb_lcfirst("Đẹp quá!")); | ||
?> | ||
--EXPECT-- | ||
== Empty String == | ||
string(0) "" | ||
string(0) "" | ||
== mb_ucfirst == | ||
string(6) "Ab" | ||
string(9) "ABS" | ||
string(12) "Đắt quá!" | ||
== mb_lcfirst == | ||
string(9) "aBS" | ||
string(9) "xin chào" | ||
string(12) "đẹp quá!" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.