----------------------------------------------------------------------
()
| 2183 | |
| 2184 | //---------------------------------------------------------------------- |
| 2185 | public function splitString() |
| 2186 | { |
| 2187 | while (strlen($this->dataStr) > 0) |
| 2188 | { |
| 2189 | if($this->dataStr == '') |
| 2190 | return 0; |
| 2191 | |
| 2192 | $mode = $this->identifyMode(0); |
| 2193 | |
| 2194 | switch ($mode) { |
| 2195 | case QR_MODE_NUM: $length = $this->eatNum(); break; |
| 2196 | case QR_MODE_AN: $length = $this->eatAn(); break; |
| 2197 | case QR_MODE_KANJI: |
| 2198 | if ($hint == QR_MODE_KANJI) |
| 2199 | $length = $this->eatKanji(); |
| 2200 | else $length = $this->eat8(); |
| 2201 | break; |
| 2202 | default: $length = $this->eat8(); break; |
| 2203 | |
| 2204 | } |
| 2205 | |
| 2206 | if($length == 0) return 0; |
| 2207 | if($length < 0) return -1; |
| 2208 | |
| 2209 | $this->dataStr = substr($this->dataStr, $length); |
| 2210 | } |
| 2211 | } |
| 2212 | |
| 2213 | //---------------------------------------------------------------------- |
| 2214 | public function toUpper() |
no test coverage detected