Lines Matching defs:len
545 $len = strlen($code);
549 for ($i = ($len - 1); $i >= 0; --$i) {
563 for ($i = $len; $i >= 0; --$i) {
586 $len = strlen($code);
588 for ($i = 0; $i < $len; $i+=2) {
592 for ($i = 1; $i < $len; $i+=2) {
713 $len = strlen($seq);
716 for ($i = 0; $i < $len; ++$i) {
718 if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq[$i] != $seq[($i+1)]))) {
931 $len = strlen($code);
935 for ($i = 0; $i < $len; ++$i) {
950 for ($i = 0; $i < $len; ++$i) {
968 --$len;
970 if (($len % 2) != 0) {
974 for ($i = 0; $i < $len; $i+=2) {
1007 if ($end_offset < $len) {
1137 $len = strlen($code);
1155 if ($end_offset < $len) {
1156 $sequence[] = array('B', substr($code, $end_offset), ($len - $end_offset));
1160 $sequence[] = array('B', $code, $len);
1171 * @param $len (string) barcode type: 6 = UPC-E, 8 = EAN8, 13 = EAN13, 12 = UPC-A
1175 protected function barcode_eanupc($code, $len=13) {
1177 if ($len == 6) {
1178 $len = 12; // UPC-A
1181 $data_len = $len - 1;
1190 if ($len > 12) {
1197 if ($len < 13) {
1211 if ($len == 12) {
1214 ++$len;
1323 $half_len = intval(ceil($len / 2));
1324 if ($len == 8) {
1335 for ($i = $half_len; $i < $len; ++$i) {
1364 * @param $len (string) barcode type: 2 = 2-Digit, 5 = 5-Digit
1368 protected function barcode_eanext($code, $len=5) {
1370 $code = str_pad($code, $len, '0', STR_PAD_LEFT);
1372 if ($len == 2) {
1374 } elseif ($len == 5) {
1424 $p = $parities[$len][$r];
1427 for ($i = 1; $i < $len; ++$i) {
1476 $len = strlen($code);
1479 for ($i = 0; $i < $len; ++$i) {
1487 $len = strlen($code);
1492 for ($i = 0; $i < $len; ++$i) {
1562 $len = strlen($code);
1606 for ($i = 0; $i < $len; ++$i) {
1614 ++$len;
1623 for ($i = 0; $i < $len; ++$i) {
1695 $len = strlen($code);
1696 for ($i = 0; $i < $len; ++$i) {
1742 $len = strlen($code);
1746 for ($i = ($len - 1); $i >= 0; --$i) {
1764 if ($len > 10) {
1768 for ($i = $len; $i >= 0; --$i) {
1783 ++$len;
1786 $len += 3;
1787 for ($i = 0; $i < $len; ++$i) {
1865 $len = strlen($seq);
1866 for ($i = 0; $i < $len; ++$i) {
2104 $len = strlen($hex);
2105 for($pos = ($len - 1); $pos >= 0; --$pos) {