get the next
@param boolean $is_string - if set to true only one byte is read
@return mixed
335627
public function next($is_string = false)
    {
        $package = '';
        while (true) {
            if ($this->pointer >= $this->length) {
                return false;
            }

            $string = $this->string[$this->pointer];
            $this->pointer++;

            if ($is_string === true) {
                return ord($string);
            }

            $value = decbin(ord($string));

            if ($value >= 10000000 && $is_string === false) {
                // now fill to eight with 00
                $package .= $value;
            } else {
                // now fill to length of eight with 0
                $value = substr('00000000', 0, 8 - strlen($value) % 8) . $value;
                return $this->base128->getValue($package . $value);
            }
        }
        return $package;
    }
886633
function uc( $str, $first = false ) {
		if ( function_exists( 'mb_strtoupper' ) ) {
			if ( $first ) {
				if ( $this->isMultibyte( $str ) ) {
					return mb_strtoupper( mb_substr( $str, 0, 1 ) ) . mb_substr( $str, 1 );
				} else {
					return ucfirst( $str );
				}
			} else {
				return $this->isMultibyte( $str ) ? mb_strtoupper( $str ) : strtoupper( $str );
			}
		} else {
			if ( $this->isMultibyte( $str ) ) {
				$x = $first ? '^' : '';
				return preg_replace_callback(
					"/$x([a-z]|[\\xc0-\\xff][\\x80-\\xbf]*)/",
					array( $this, 'ucCallback' ),
					$str
				);
			} else {
				return $first ? ucfirst( $str ) : strtoupper( $str );
			}
		}
	}
402947
public function find($string)
    {
        if (strlen($string) == 2) {
            if (Text::isUpper($string)) {
                return $this->findByCountry($string);
            }

            return $this->findByLanguage($string);
        }

        return $this->findByLocale($string);
    }
95373
public static function toBool($string)
    {
        if (null === $string) {
            return null;
        }

        return in_array(strtolower($string), self::$booleanTrue);
    }
145418
static String readString(final InputStream is) {
        try (final Scanner s = new Scanner(is, "UTF-8")) {
            s.useDelimiter("\\A");
            if (s.hasNext()) {
                return s.next();
            } else {
                return "";
            }
        }
    }
112941
public function getCurrentLine() {
        // Check the string isn't empty
        if ($this->EOF) {
            // Add one to $this->char because we want the number for the next
            // byte to be processed.
            return substr_count($this->data, "\n", 0, min($this->char, $this->EOF)) + 1;
        } else {
            // If the string is empty, we are on the first line (sorta).
            return 1;
        }
    }
1193995
public function read($length = null)
    {
        $buffer = '';
        $total = count($this->_streams) - 1;
        $remaining = (integer) ($length === null ? $this->_bufferSize : $length);
        $progressToNext = false;

        while ($remaining > 0) {

            // Progress to the next stream if needed.
            if ($progressToNext || $this->_streams[$this->_current]->eof()) {
                $progressToNext = false;
                if ($this->_current === $total) {
                    break;
                }
                $this->_current++;
            }

            $result = $this->_streams[$this->_current]->read($remaining);

            if (!$result) {
                $progressToNext = true;
                continue;
            }

            $buffer .= $result;
            $remaining = $length - strlen($buffer);
        }

        $this->_offset += strlen($buffer);
        return $buffer;
    }
1025942
public function read($length)
    {
        $index = 0;
        $contents = '';
        while ($this->iterator->valid() && $index < $length) {
            if ($this->stringify !== null) {
                $contents .= $this->stringify->call($this, $this->iterator->current());
            } else {
                $contents .= $this->iterator->current();
            }

            $this->iterator->next();
            ++$this->position;
            ++$index;
        }

        return $contents;
    }
658898
protected function getComparatorFromString($string)
    {
        foreach (self::$comparators as $comparator) {
            if (strpos($string, $comparator) !== false) {
                return $comparator;
            }
        }

        return null;
    }
246015
public function readBytes($length)
    {
        $read = $this->read($length);
        if (false !== $read) {
            $ret = array_map('ord', str_split($read, 1));

            return $ret;
        }

        return false;
    }
980952
function next(){
		if( ! $this->length ){
			return false;
		}
		$p = $this->p + 1;
		if( !isset($this->children[$p]) ){
			$this->p = 0;
			return false;
		}
		$this->p = $p;
		return $this->children[$p];
	}
263493
public function read($offset, $length = 1)
    {
        $ret = '';
        $segno = floor($offset / $this->segsize);
        $sOffset = $offset % $this->segsize;
        while (true) {
            if (!isset($this->segments[$segno])) {
                if (!$this->open($segno)) {
                    goto ret;
                }
            }

            $ret .= shmop_read($this->segments[$segno], $sOffset, min($length - mb_orig_strlen($ret), $this->segsize));

            if (mb_orig_strlen($ret) >= $length) {
                goto ret;
            }

            ++$segno;

            $sOffset = 0;
        }
        ret:

        return $ret === '' ? false : $ret;
    }
291998
public function ucFirst($string)
    {
        $first = $this->sub($string, 0, 1);
        $first = $this->upp($first);

        return $first . $this->sub($string, 1);
    }
169944
@Override
	public boolean next() {
		if (isLhsEmpty)
			return false;
		if (s2.next())
			return true;
		else if (!(isLhsEmpty = !s1.next())) {
			s2.beforeFirst();
			return s2.next();
		} else {
			return false;
		}
	}
1273078
private function readNextRecord()
    {
        if ($this->isEOF) {
            $this->isValidPosition = false;
        }

        $isInRecord = false;
        $recording = '';

        while (false !== ($line = fgets($this->handle))) {
            $isNewArrayStart = strpos($line, '-') === 0;

            if ($isInRecord && $isNewArrayStart) {
                fseek($this->handle, -strlen($line), SEEK_CUR);
                break;
            }

            if (!$isInRecord && $isNewArrayStart) {
                $isInRecord = true;
            }

            if ($isInRecord) {
                $recording .= $line;
            }
        }

        if ($line == false) {
            $this->isEOF = true;
        }

        return $recording;
    }
1358580
public function getNext()
    {
        if ($this->currentToken !== null || strlen($this->currentInput) > 0) {
            $this->parseNextToken();

            return $this->currentToken;
        }

        return null;
    }
1344168
public function readBinary()
    {
        $length = $this->readVInt();
        $returnValue = substr($this->_data, $this->_position, $length);
        $this->_position += $length;
        return $returnValue;
    }