MCPcopy Create free account
hub / github.com/codemistic/Web-Development / toUpper

Method toUpper

text-to-qr/lib/phpqrcode/qrsplit.php:277–295  ·  view source on GitHub ↗

----------------------------------------------------------------------

()

Source from the content-addressed store, hash-verified

275
276 //----------------------------------------------------------------------
277 public function toUpper()
278 {
279 $stringLen = strlen($this->dataStr);
280 $p = 0;
281
282 while ($p<$stringLen) {
283 $mode = self::identifyMode(substr($this->dataStr, $p), $this->modeHint);
284 if($mode == QR_MODE_KANJI) {
285 $p += 2;
286 } else {
287 if (ord($this->dataStr[$p]) >= ord('a') && ord($this->dataStr[$p]) <= ord('z')) {
288 $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32);
289 }
290 $p++;
291 }
292 }
293
294 return $this->dataStr;
295 }
296
297 //----------------------------------------------------------------------
298 public static function splitStringToQRinput($string, QRinput $input, $modeHint, $casesensitive = true)

Callers 1

splitStringToQRinputMethod · 0.45

Calls 1

identifyModeMethod · 0.95

Tested by

no test coverage detected