We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cde3fb3 commit 01ff860Copy full SHA for 01ff860
src/Str.php
@@ -22,10 +22,10 @@ final class Str implements StringInterface
22
* Create a string from a string value
23
*
24
* @param string|Stringable $string Initial string value
25
- * @param string $encoding Character encoding to use
+ * @param ?string $encoding Character encoding to use
26
* @return self New string instance
27
*/
28
- public static function from(string|Stringable $string, string $encoding = 'UTF-8'): self
+ public static function from(string|Stringable $string, ?string $encoding = null): self
29
{
30
return new self($string, $encoding);
31
}
0 commit comments