concat 2 CharSequences

@param left
@param right
@return concated String
547905
public static CharSequence concat(CharSequence left, CharSequence right) {
	if (left instanceof Appendable) {
	    try {
		((Appendable) left).append(right);
		return left;
	    }
	    catch (IOException e) {}
	}
	return new StringBuilder(left).append(right);
    }
421109
def merge(left, right, how='inner', key=None, left_key=None, right_key=None,
          left_as='left', right_as='right'):
    
    return join(left, right, how, key, left_key, right_key,
                join_fn=make_union_join(left_as, right_as))
173358
public static function xorStrings(string $left, string $right): string
    {
        $length = Binary::safeStrlen($left);
        if ($length !== Binary::safeStrlen($right)) {
            throw new InvalidType(
                'Both strings must be the same length'
            );
        }
        if ($length < 1) {
            return '';
        }
        return (string) ($left ^ $right);
    }
398880
public function appendCode($left, $right)
    {
        if (preg_match('/\s*\?>\s*$/', $left) && preg_match('/^\s*<\?php\s+/', $right)) {
            $left = preg_replace('/\s*\?>\s*$/', "\n", $left);
            $left .= preg_replace('/^\s*<\?php\s+/', '', $right);
        } else {
            $left .= $right;
        }
        return $left;
    }
848902
public static CharSequence concat(CharSequence... lines) {
		return new CharSequence() {

			private final StringBuilder content = new StringBuilder();

			private int next;

			private int length = -1;

			@Override
			public String toString() {
				ensure(length());
				return this.content.toString();
			}

			private void ensure(int index) {
				while (this.next < lines.length && index >= this.content.length()) {
					if (lines[this.next] != null) {
						this.content.append(lines[this.next]).append("\n"); //$NON-NLS-1$
					}
					++this.next;
				}
			}

			@Override
			public CharSequence subSequence(int start, int end) {
				ensure(end - 1);
				return this.content.subSequence(start, end);
			}

			@Override
			public int length() {
				if (this.length < 0) {
					int len = 0;
					for (final CharSequence seq : lines) {
						len += seq.length() + 1;
					}
					len = Math.max(0, len - 1);
					this.length = len;
				}
				return this.length;
			}

			@Override
			public char charAt(int index) {
				ensure(index);
				return this.content.charAt(index);
			}
		};
	}
1228203
private static function merge($left, $right): array
    {
        $result = [];
        $i = $j = 0;

        $leftCount = count($left);
        $rightCount = count($right);

        while ($i < $leftCount && $j < $rightCount) {
            if ($left[$i] > $right[$j]) {
                $result[] = $right[$j];
                $j++;
            } else {
                $result[] = $left[$i];
                $i++;
            }
        }
        while ($i < $leftCount) {
            $result[] = $left[$i];
            $i++;
        }
        while ($j < $rightCount) {
            $result[] = $right[$j];
            $j++;
        }

        return $result;
    }
708914
public static <L, R> @NonNull Pair<L, R> left(final @Nullable L left) {
    return of(left, null);
  }
503003
protected function addBinary($left, $right) {
        $len    = max(strlen($left), strlen($right));
        $left   = str_pad($left, $len, chr(0), STR_PAD_LEFT);
        $right  = str_pad($right, $len, chr(0), STR_PAD_LEFT);
        $result = '';
        $carry  = 0;
        for ($i = 0; $i < $len; $i++) {
            $sum     = ord($left[$len - $i - 1])
                 + ord($right[$len - $i - 1])
                 + $carry;
            $result .= chr($sum % 256);
            $carry   = $sum >> 8;
        }
        while ($carry) {
            $result .= chr($carry % 256);
            $carry >>= 8;
        }
        return strrev($result);
    }
726816
protected function opEq($left, $right)
    {
        if (($lStr = $this->coerceString($left)) && ($rStr = $this->coerceString($right))) {
            $lStr[1] = '';
            $rStr[1] = '';

            $left = $this->compileValue($lStr);
            $right = $this->compileValue($rStr);
        }

        return $this->toBool($left === $right);
    }
914201
public static Slice leftTrim(Slice utf8, int[] whiteSpaceCodePoints)
    {
        int length = utf8.length();

        int position = firstNonMatchPosition(utf8, whiteSpaceCodePoints);
        return utf8.slice(position, length - position);
    }
694041
public static MaybeAssignedSet join(MaybeAssignedSet left, MaybeAssignedSet right) {
		if (left == null && right == null) {
			return null;
		} else if (left == null) {
			return right;
		} else if (right == null) {
			return left;
		} else {
			return left.join(right);
		}
	}
838768
public static <S, T> Either<S, T> left(S left) {
    return new Left<>(left);
  }
63066
protected function _merge( array $left, array $right )
	{
		foreach( $right as $key => $value )
		{
			if( isset( $left[$key] ) && is_array( $left[$key] ) && is_array( $value ) ) {
				$left[$key] = $this->_merge( $left[$key], $value );
			} else {
				$left[$key] = $value;
			}
		}

		return $left;
	}
179331
public static StringBuilder leftShift(StringBuilder self, Object value) {
        if (value instanceof CharSequence)
            return self.append((CharSequence)value);
        else
            return self.append(value);
    }
1106475
@Override
    public int leftAdjustCharHead(byte[]bytes, int p, int s, int end) {
        if (s <= p) return s;
        int p_ = s;
        while (!utf8IsLead(bytes[p_] & 0xff) && p_ > p) p_--;
        return p_;
    }
510646
protected String concat(String first, String second) {
        return first == null ? second : String.format("%s.%s", first, second);
    }
1000188
private static void concat(double[] target, double[] first, int firstLength, double[] second, int secondLength)
    {
        System.arraycopy(first, 0, target, 0, firstLength);
        System.arraycopy(second, 0, target, firstLength, secondLength);
    }