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

Method toUpper

text-to-qr/lib/phpqrcode/phpqrcode.php:2214–2232  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

2212
2213 //----------------------------------------------------------------------
2214 public function toUpper()
2215 {
2216 $stringLen = strlen($this->dataStr);
2217 $p = 0;
2218
2219 while ($p<$stringLen) {
2220 $mode = self::identifyMode(substr($this->dataStr, $p), $this->modeHint);
2221 if($mode == QR_MODE_KANJI) {
2222 $p += 2;
2223 } else {
2224 if (ord($this->dataStr[$p]) >= ord('a') && ord($this->dataStr[$p]) <= ord('z')) {
2225 $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32);
2226 }
2227 $p++;
2228 }
2229 }
2230
2231 return $this->dataStr;
2232 }
2233
2234 //----------------------------------------------------------------------
2235 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