FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

String改为StringObject · onejson/framework@309ede4 · GitHub

Repository navigation

Commit 309ede4

Browse files
committed
String改为StringObject
1 parent 4ec1ed7 commit 309ede4

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎libs/Swoole/ArrayObject.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function contains($val)
7575

7676
function join($str)
7777
{
78-
return new String(implode($str, $this->array));
78+
return new StringObject(implode($str, $this->array));
7979
}
8080

8181
function insert($offset, $val)
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
namespace Swoole;
33

4-
class String
4+
class StringObject
55
{
66
protected $string;
77

@@ -32,12 +32,12 @@ function ipos($find_str)
3232

3333
function lower()
3434
{
35-
return new String(strtolower($this->string));
35+
return new StringObject(strtolower($this->string));
3636
}
3737

3838
function upper()
3939
{
40-
return new String(strtoupper($this->string));
40+
return new StringObject(strtoupper($this->string));
4141
}
4242

4343
function len()
@@ -47,12 +47,12 @@ function len()
4747

4848
function substr($offset, $length = null)
4949
{
50-
return new String(substr($this->string, $offset, $length));
50+
return new StringObject(substr($this->string, $offset, $length));
5151
}
5252

5353
function replace($search, $replace, &$count = null)
5454
{
55-
return new String(str_replace($search, $replace, $this->string, $count));
55+
return new StringObject(str_replace($search, $replace, $this->string, $count));
5656
}
5757

5858
function startWith($needle)

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL