Skip to content

Commit 4511312

Browse files
tcochjaviereguiluz
authored andcommitted
[String] Add AbstractString::pascal() method
1 parent 2ccc964 commit 4511312

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

string.rst

+8-2
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,10 @@ Methods to Change Case
234234
u('Foo: Bar-baz.')->snake(); // 'foo_bar_baz'
235235
// changes all graphemes/code points to kebab-case
236236
u('Foo: Bar-baz.')->kebab(); // 'foo-bar-baz'
237-
// other cases can be achieved by chaining methods. E.g. PascalCase:
238-
u('Foo: Bar-baz.')->camel()->title(); // 'FooBarBaz'
237+
// changes all graphemes/code points to PascalCase
238+
u('Foo: Bar-baz.')->pascal(); // 'FooBarBaz'
239+
// other cases can be achieved by chaining methods, e.g. :
240+
u('Foo: Bar-baz.')->camel()->upper(); // 'FOOBARBAZ'
239241

240242
.. versionadded:: 7.1
241243

@@ -246,6 +248,10 @@ Methods to Change Case
246248

247249
The ``kebab()`` method was introduced in Symfony 7.2.
248250

251+
.. versionadded:: 7.3
252+
253+
The ``pascal()`` method was introduced in Symfony 7.3.
254+
249255
The methods of all string classes are case-sensitive by default. You can perform
250256
case-insensitive operations with the ``ignoreCase()`` method::
251257

0 commit comments

Comments
 (0)