| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -75,7 +75,7 @@ function contains($val) | |||
| 75 | 75 | ||
| 76 | 76 | function join($str) | |
| 77 | 77 | { | |
| 78 | - return new String(implode($str, $this->array)); | ||
| 78 | + return new StringObject(implode($str, $this->array)); | ||
| 79 | 79 | } | |
| 80 | 80 | ||
| 81 | 81 | function insert($offset, $val) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | <?php | |
| 2 | 2 | namespace Swoole; | |
| 3 | 3 | ||
| 4 | - class String | ||
| 4 | + class StringObject | ||
| 5 | 5 | { | |
| 6 | 6 | protected $string; | |
| 7 | 7 | ||
@@ -32,12 +32,12 @@ function ipos($find_str) | |||
| 32 | 32 | ||
| 33 | 33 | function lower() | |
| 34 | 34 | { | |
| 35 | - return new String(strtolower($this->string)); | ||
| 35 | + return new StringObject(strtolower($this->string)); | ||
| 36 | 36 | } | |
| 37 | 37 | ||
| 38 | 38 | function upper() | |
| 39 | 39 | { | |
| 40 | - return new String(strtoupper($this->string)); | ||
| 40 | + return new StringObject(strtoupper($this->string)); | ||
| 41 | 41 | } | |
| 42 | 42 | ||
| 43 | 43 | function len() | |
@@ -47,12 +47,12 @@ function len() | |||
| 47 | 47 | ||
| 48 | 48 | function substr($offset, $length = null) | |
| 49 | 49 | { | |
| 50 | - return new String(substr($this->string, $offset, $length)); | ||
| 50 | + return new StringObject(substr($this->string, $offset, $length)); | ||
| 51 | 51 | } | |
| 52 | 52 | ||
| 53 | 53 | function replace($search, $replace, &$count = null) | |
| 54 | 54 | { | |
| 55 | - return new String(str_replace($search, $replace, $this->string, $count)); | ||
| 55 | + return new StringObject(str_replace($search, $replace, $this->string, $count)); | ||
| 56 | 56 | } | |
| 57 | 57 | ||
| 58 | 58 | function startWith($needle) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments