|
@@ 214-222 (lines=9) @@
|
| 211 |
|
* |
| 212 |
|
* @return bool true if the end of the string was reached, false otherwise |
| 213 |
|
*/ |
| 214 |
|
public static function skipWhiteSpace($text, &$textIndex) |
| 215 |
|
{ |
| 216 |
|
$textLen = strlen($text); |
| 217 |
|
while (($textIndex < $textLen) && Char::isWhiteSpace($text[$textIndex])) { |
| 218 |
|
++$textIndex; |
| 219 |
|
} |
| 220 |
|
|
| 221 |
|
return $textLen == $textIndex; |
| 222 |
|
} |
| 223 |
|
|
| 224 |
|
/** |
| 225 |
|
* Reads the type and subtype specifications for a MIME type. |
|
@@ 278-286 (lines=9) @@
|
| 275 |
|
* |
| 276 |
|
* @return bool true if the end of the text was reached; false otherwise |
| 277 |
|
*/ |
| 278 |
|
public static function readToken($text, &$textIndex) |
| 279 |
|
{ |
| 280 |
|
$textLen = strlen($text); |
| 281 |
|
while (($textIndex < $textLen) && self::isHttpTokenChar($text[$textIndex])) { |
| 282 |
|
++$textIndex; |
| 283 |
|
} |
| 284 |
|
|
| 285 |
|
return $textLen == $textIndex; |
| 286 |
|
} |
| 287 |
|
|
| 288 |
|
/** |
| 289 |
|
* To check whether the given character is a HTTP token character |