Adds a single character to the suffix tree.
Updates edges as well as nodes

@param string $pChar A single character
762601
private function addChar( $pChar ) {
        $this->text[++$this->position]  = $pChar;
        $this->needSuffixLink           = -1;
        $this->remainder++;

        while( $this->remainder > 0 ) {
            if ( $this->activeLength === 0 ) {
                $this->activeEdge = $this->position;
            }
            
            if ( !array_key_exists( $this->getActiveEdge(), $this->nodes[$this->activeNode]->next ) ) {
                // suffix does not exist in the parent
                $leaf = $this->newNode( $this->position, $this->upperBound );
                $this->nodes[$this->activeNode]->next[$this->getActiveEdge()] = $leaf;
                $this->addSuffixLink( $this->activeNode );
            } else {
                $next = $this->nodes[$this->activeNode]->next[$this->getActiveEdge()];
                if ( $this->walkDown( $next ) ) {
                    continue;
                }
                if ( $this->text[$this->nodes[$next]->start + $this->activeLength] === $pChar ) {
                    $this->activeLength++;
                    $this->addSuffixLink( $this->activeNode );
                    break;
                }
                $split = $this->newNode( $this->nodes[$next]->start, $this->nodes[$next]->start + $this->activeLength );
                $this->nodes[$this->activeNode]->next[$this->getActiveEdge()] = $split;
                $leaf = $this->newNode( $this->position, $this->upperBound );

                $this->nodes[$split]->next[$pChar] = $leaf;
                $this->nodes[$next]->start += $this->activeLength;
                $this->nodes[$split]->next[$this->text[$this->nodes[$next]->start]] = $next;
                $this->addSuffixLink( $split );
            }
            $this->remainder--;

            if ( $this->activeNode == $this->root && $this->activeLength > 0 ) {
                $this->activeLength--;
                $this->activeEdge = $this->position - $this->remainder + 1;
            } else {
                if ( $this->nodes[$this->activeNode]->link > 0 ) {
                    $this->activeNode = $this->nodes[$this->activeNode]->link;
                } else {
                    $this->activeNode = $this->root;
                }
            }
        }
    }
894424
public function add_keyword($key, $word) {
        if (!is_array($this->language_data['KEYWORDS'][$key])) {
            $this->language_data['KEYWORDS'][$key] = array();
        }
        if (!in_array($word, $this->language_data['KEYWORDS'][$key])) {
            $this->language_data['KEYWORDS'][$key][] = $word;

            //NEW in 1.0.8 don't recompile the whole optimized regexp, simply append it
            if ($this->parse_cache_built) {
                $subkey = count($this->language_data['CACHED_KEYWORD_LISTS'][$key]) - 1;
                $this->language_data['CACHED_KEYWORD_LISTS'][$key][$subkey] .= '|' . preg_quote($word, '/');
            }
        }
    }
735296
public function addConnection( $src, $dst )
    {
        $this->edges[$src][] = $dst;

        // Remove node with new incoming edge from initial leaves array
        if ( ( $id = array_search( $dst, $this->leaves ) ) !== false )
        {
            unset( $this->leaves[$id] );
        }
    }
169935
private function addSegment(string $segment): void
    {
        preg_match_all(
            "/\{(?'name'[a-z0-9_]++)(?::(?'pattern'(?:[^{}]++|\{(?&pattern)\})++))?\}/i",
            $segment,
            $matches,
            \PREG_SET_ORDER | \PREG_OFFSET_CAPTURE | \PREG_UNMATCHED_AS_NULL
        );

        if (empty($matches)) {
            $this->segments[] = $segment;
            $this->format .= $this->formatEncode($segment) . '/';
            return;
        }

        $pattern = $this->formatPattern($segment, $matches);
        $this->patterns[\count($this->segments)] = sprintf('/%s/', $pattern);
        $this->segments[] = self::DYNAMIC_SEGMENT;
    }
590718
public function add_path(string $path)
    {
        $path = \trailingslashit($path);
        $this->paths[] = $path;
        $this->parse_files($path);
    }
11646
public function addWord($word, $value = 1)
    {
        if (isset($this->wordsArray[$word])) {
            $this->wordsArray[$word] += $value;
        } else {
            $this->wordsArray[$word] = $value;
        }
    }
312077
private void addNode(final TrieNode<V> node, final CharSequence key,
                         final int beginIndex, final TrieNode<V> newNode) {
        final int lastKeyIndex = key.length() - 1;
        TrieNode<V> currentNode = node;
        int i = beginIndex;

        for (; i < lastKeyIndex; i++) {
            final TrieNode<V> nextNode = new TrieNode<V>(false);
            currentNode.children.put(key.charAt(i), nextNode);
            currentNode = nextNode;
        }

        currentNode.children.put(key.charAt(i), newNode);
    }
1032346
public final static void appendHexEntity(final StringBuilder out, final char value)
    {
        out.append("&#x");
        out.append(Integer.toHexString(value));
        out.append(';');
    }
242995
public function append(string $string) {
        for ($i = 0; $i < \strlen($string); $i++) {
            $this->arrayList->add($string[$i]);
        }
    }
1295256
public static function addPngChunk($chunk,$png) {
        $len = strlen($png);
        return substr($png,0,$len-12) . $chunk . substr($png,$len-12,12);
    }
876074
protected function addManyRelation(string $relation)
    {
        if (!in_array($relation, $this->manyRelations)) {
            $this->manyRelations[] = $relation;
        }
    }
281816
public void add(char ch) {
		if (b.length <= i) {
			b = ArrayUtil.grow(b, i + 1);
		}
		b[i++] = ch;
	}
149331
public function _updateContentType()
    {
        unset($this->_headers['Content-Type']);
        $suffix = '';
        if ($this->isMultipart()) {
            $suffix = '; boundary=' . $this->boundary();
        } elseif ($this->_charset) {
            $suffix = '; charset=' . $this->_charset . $suffix;
        }
        if ($this->_mime) {
            $this->_headers['Content-Type'] = $this->_mime . $suffix;
        }
    }
80105
public function glyph( $char ) {
		$uChar = json_decode( sprintf( '"\u%s"', $char ), false );
		$this->name( $uChar );

		return $this;
	}
1244218
protected void addLinksForIndexes(Content contentTree) {
        for (int i = 0; i < indexElements.size(); i++) {
            int j = i + 1;
            contentTree.addContent(getHyperLink(DocPaths.indexN(j),
                    new StringContent(indexElements.get(i).toString())));
            contentTree.addContent(Contents.SPACE);
        }
    }
91689
protected function addFluentIndexes()
	{
		foreach ( $this->columns as $column )
		{
			foreach ( ['primary', 'unique', 'index'] as $index )
			{
				// If the index has been specified on the given column, but is simply
				// equal to "true" (boolean), no name has been specified for this
				// index, so we will simply call the index methods without one.
				if ( $column->$index === true )
				{
					$this->$index( $column->name );

					continue 2;
				}

				// If the index has been specified on the column and it is something
				// other than boolean true, we will assume a name was provided on
				// the index specification, and pass in the name to the method.
				elseif ( isset( $column->$index ) )
				{
					$this->$index( $column->name, $column->$index );

					continue 2;
				}
			}
		}
	}
632432
public function addIndent($whitespace) {
    $has_indent = $this->children(function (Node $node) {
      return !($node instanceof CommentNode);
    })->count() > 0;
    if ($has_indent) {
      $this->children(Filter::isInstanceOf('\Pharborist\WhitespaceNode'))->each(function (WhitespaceNode $ws_node) use ($whitespace) {
        $ws_node->setText($ws_node->getText() . $whitespace);
      });
    }
    else {
      $this->children()->before(Token::whitespace($whitespace));
    }
    return $this;
  }