@@ 60-74 (lines=15) @@ | ||
57 | 0x9F => 0x0178, |
|
58 | ]; |
|
59 | ||
60 | public function toArray($delim = '', $limit = null) |
|
61 | { |
|
62 | $this->parse(); |
|
63 | ||
64 | if (empty($delim)) { |
|
65 | return $this->chars; |
|
66 | } |
|
67 | if (is_int($delim)) { |
|
68 | return \str_split($this->raw, $delim); |
|
69 | } |
|
70 | if ($limit === null) { |
|
71 | return \explode($delim, $this->raw); |
|
72 | } |
|
73 | return \explode($delim, $this->raw, $limit); |
|
74 | } |
|
75 | ||
76 | /** |
|
77 | * @return string |
@@ 7-19 (lines=13) @@ | ||
4 | ||
5 | class AString extends AnyString |
|
6 | { |
|
7 | public function toArray($delim = '', $limit = null) |
|
8 | { |
|
9 | if (empty($delim)) { |
|
10 | return \str_split($this->raw); |
|
11 | } |
|
12 | if (is_int($delim)) { |
|
13 | return \str_split($this->raw, $delim); |
|
14 | } |
|
15 | if ($limit === null) { |
|
16 | return \explode($delim, $this->raw); |
|
17 | } |
|
18 | return \explode($delim, $this->raw, $limit); |
|
19 | } |
|
20 | ||
21 | // INFORMATIONAL METHODS |
|
22 |