<?php
namespace Veno\QrCdr\Lib;

if ( ! defined( 'ABSPATH' ) && ! defined( 'QRCDR_OPEN_ACCESS' ) ) {
	exit;
}

/**
 * String manipulation utility class.
 * Namespaced: Veno\QrCdr\Lib\QrcdrStr
 */
class QrcdrStr {
	public static function set(&$srctab, $x, $y, $repl, $replLen = false) {
		$srctab[$y] = substr_replace(
			$srctab[$y],
			($replLen !== false) ? substr($repl, 0, $replLen) : $repl,
			$x,
			($replLen !== false) ? $replLen : strlen($repl)
		);
	}
}
