Use this command to set the form and gap length or black line thickness when using the transmissive (gap) sensor,
@param int $labelLength
@param int $gapLength
@param int|null $offsetLength
@throws \Epl\ExceptionCommand
@return CommandHelper
169036
public function setFormLength($labelLength, $gapLength, $offsetLength = null)
    {
        $command = new Command\Stored\SetFormLengthCommand($labelLength, $gapLength, $offsetLength);
        $this->getComposite()->addCommand($command);
        return $this;
    }
189916
function _fnFeatureHtmlLength ( oSettings )
		{
			if ( oSettings.oScroll.bInfinite )
			{
				return null;
			}
			
			/* This can be overruled by not using the _MENU_ var/macro in the language variable */
			var sName = 'name="'+oSettings.sTableId+'_length"';
			var sStdMenu = '<select size="1" '+sName+'>';
			var i, iLen;
			var aLengthMenu = oSettings.aLengthMenu;
			
			if ( aLengthMenu.length == 2 && typeof aLengthMenu[0] === 'object' && 
					typeof aLengthMenu[1] === 'object' )
			{
				for ( i=0, iLen=aLengthMenu[0].length ; i<iLen ; i++ )
				{
					sStdMenu += '<option value="'+aLengthMenu[0][i]+'">'+aLengthMenu[1][i]+'</option>';
				}
			}
			else
			{
				for ( i=0, iLen=aLengthMenu.length ; i<iLen ; i++ )
				{
					sStdMenu += '<option value="'+aLengthMenu[i]+'">'+aLengthMenu[i]+'</option>';
				}
			}
			sStdMenu += '</select>';
			
			var nLength = document.createElement( 'div' );
			if ( !oSettings.aanFeatures.l )
			{
				nLength.id = oSettings.sTableId+'_length';
			}
			nLength.className = oSettings.oClasses.sLength;
			nLength.innerHTML = '<label>'+oSettings.oLanguage.sLengthMenu.replace( '_MENU_', sStdMenu )+'</label>';
			
			/*
			 * Set the length to the current display length - thanks to Andrea Pavlovic for this fix,
			 * and Stefan Skopnik for fixing the fix!
			 */
			$('select option[value="'+oSettings._iDisplayLength+'"]', nLength).attr("selected", true);
			
			$('select', nLength).bind( 'change.DT', function(e) {
				var iVal = $(this).val();
				
				/* Update all other length options for the new display */
				var n = oSettings.aanFeatures.l;
				for ( i=0, iLen=n.length ; i<iLen ; i++ )
				{
					if ( n[i] != this.parentNode )
					{
						$('select', n[i]).val( iVal );
					}
				}
				
				/* Redraw the table */
				oSettings._iDisplayLength = parseInt(iVal, 10);
				_fnCalculateEnd( oSettings );
				
				/* If we have space to show extra rows (backing up from the end point - then do so */
				if ( oSettings.fnDisplayEnd() == oSettings.fnRecordsDisplay() )
				{
					oSettings._iDisplayStart = oSettings.fnDisplayEnd() - oSettings._iDisplayLength;
					if ( oSettings._iDisplayStart < 0 )
					{
						oSettings._iDisplayStart = 0;
					}
				}
				
				if ( oSettings._iDisplayLength == -1 )
				{
					oSettings._iDisplayStart = 0;
				}
				
				_fnDraw( oSettings );
			} );
		
		
			$('select', nLength).attr('aria-controls', oSettings.sTableId);
			
			return nLength;
		}
408849
public static Integer getSegmentPrefixLength(int bitsPerSegment, Integer prefixLength, int segmentIndex) {
		if(prefixLength != null) {
			return getPrefixedSegmentPrefixLength(bitsPerSegment, prefixLength, segmentIndex);
		}
		return null;
	}
1189106
protected function _prepareParamLabel($label = null, $length = 0) {
		$truncateOpt = [
			'ellipsis' => '...',
			'exact' => false,
			'html' => false
		];
		if (empty($label) || ($length <= 0)) {
			return $label;
		}

		$label = CakeText::truncate($label, $length, $truncateOpt);

		return $label;
	}
977299
public function setMaximumLength($maximumLength)
    {
        if ($maximumLength <= $this->minimalLength) {
            throw new Exception\InvalidArgumentException('Maximum length must be larger than minimal length.');
        }

        $this->maximumLength = $maximumLength;

        return $this;
    }
769022
protected function _wrap($message, $wrapLength = CakeEmail::LINE_LENGTH_MUST) {
		if ($this->_wrapLength !== null) {
			$wrapLength = $this->_wrapLength;
		}
		return parent::_wrap($message, $wrapLength);
	}
1221946
public function setMinLength(string $elementName, int $minLength, string $errorMessage = null): \IvoPetkov\BearFrameworkAddons\Form\Constraints
    {
        if ($errorMessage === null) {
            $errorMessage = sprintf(__('ivopetkov.form.The length of this field must be atleast %s characters.'), $minLength);
        }
        $this->data[] = ['minLength', $errorMessage, $elementName, $minLength];
        return $this;
    }
91236
protected static final int nextStringLength(byte[] bytes, int startPos, int length, char delimiter) {
		if (length <= 0) {
			throw new IllegalArgumentException("Invalid input: Empty string");
		}
		int limitedLength = 0;
		final byte delByte = (byte) delimiter;

		while (limitedLength < length && bytes[startPos + limitedLength] != delByte) {
			limitedLength++;
		}

		return limitedLength;
	}
643908
synchronized void setLength(long length) {
        Preconditions.checkState(!this.sealed, "Cannot increase the length of a sealed SegmentChunk.");
        Preconditions.checkArgument(length >= 0, "length must be a non-negative number.");
        this.length = length;
    }
663941
public function createSecret($secretLength = 16)
    {
        $validChars = $this->_getBase32LookupTable();
        unset($validChars[32]);

        // modified by matomo.org
        return \Piwik\Common::getRandomString($secretLength, implode('', $validChars));
    }
576390
public EasyRandomParameters stringLengthRange(final int minStringLength, final int maxStringLength) {
        if (minStringLength < 0) {
            throw new IllegalArgumentException("minStringLength must be >= 0");
        }
        if (minStringLength > maxStringLength) {
            throw new IllegalArgumentException(format("minStringLength (%s) must be <= than maxStringLength (%s)",
                    minStringLength, maxStringLength));
        }
        setStringLengthRange(new Range<>(minStringLength, maxStringLength));
        return this;
    }
25125
public function asSecret(StringLength $length = null)
    {
        return $this->handleFilter(
                function() use($length)
                {
                    return filter\RangeFilter::wrap(
                            filter\SecretFilter::instance(),
                            $length
                    );
                }
        );
    }
758956
public static byte[] encodeLength(int length, int offset) {
        if (length < SIZE_THRESHOLD) {
            byte firstByte = (byte) (length + offset);
            return new byte[] { firstByte };
        } else if (length < MAX_ITEM_LENGTH) {
            byte[] binaryLength;
            if (length > 0xFF)
                binaryLength = intToBytesNoLeadZeroes(length);
            else
                binaryLength = new byte[] { (byte) length };
            byte firstByte = (byte) (binaryLength.length + offset + SIZE_THRESHOLD - 1);
            return concatenate(new byte[] { firstByte }, binaryLength);
        } else {
            throw new RuntimeException("Input too long");
        }
    }
1164387
public function setLength() {
        $argc = func_num_args();
        $argv = func_get_args();

        if ($argc == 1 && is_integer($argv[0])) {
            $this->minLength = $argv[0];
            $this->maxLength = 0;
            return true;
        } else if ($argc == 2 && is_integer($argv[0]) && is_integer($argv[1])) {
            if ($argv[0] > $argv[1]) {
                throw new \Exception("Min length must be less or equal to max length");
            }

            $this->minLength = $argv[0];
            $this->maxLength = $argv[1];

            return true;
        } else if ($argc == 1 && is_string($argv[0])) {
            $str = $argv[0];

            if (isset(StringS::$compiledLengths[$str])) {
                $lengthInfo = StringS::$compiledLengths[$str];
                goto set_info;
            }

            $lengthInfo = array();

            for ($i = 0; $i < strlen($str); $i++) {
                if (isset($matchedBracket) && $matchedBracket === true) {
                    throw new \Exception("Unexpected character '" . $str[$i] . "'");
                } else if ($i === 0 && $str[$i] === "(") {
                    if (count($lengthInfo) === 0) {
                        $lengthInfo[] = "";
                        $matchedBracket = false;
                    } else {
                        throw new \Exception("Unexpected character '('");
                    }
                } else if ($str[$i] === ")") {
                    $matchedBracket = true;
                } else if (is_numeric($str[$i]) && count($lengthInfo) > 0) {
                    if (count($lengthInfo) === 1 || count($lengthInfo) === 2) {
                        $lengthInfo[count($lengthInfo) - 1] .= $str[$i];
                    } else {
                        throw new \Exception("Unexpected character '" . $str[$i] . "'");
                    }
                } else if ($str[$i] === '.' && $i + 1 < strlen($str) && $str[$i + 1] === '.') {
                    if (count($lengthInfo) === 1) {
                        $lengthInfo[] = "";
                        $i++;
                    } else {
                        throw new \Exception("Unexpected token '..'");
                    }
                } else {
                    throw new \Exception("Unexpected character '" . $str[$i] . "'");
                }
            }

            $lengthInfo[0] = empty($lengthInfo[0]) ? 0 : intval($lengthInfo[0]);
            $lengthInfo[1] = empty($lengthInfo[1]) ? 0 : intval($lengthInfo[1]);

            if ($lengthInfo[1] !== 0 && $lengthInfo[0] !== 0 && $lengthInfo[0] > $lengthInfo[1]) {
                throw new \Exception("Min length must be less than or equal to max length");
            }
            StringS::$compiledLengths[$str] = $lengthInfo;

set_info:
            $this->minLength = $lengthInfo[0];
            $this->maxLength = $lengthInfo[1];
            return true;
        }
        return false;
    }
484777
public static function CreateShortSideReducer( int $portraitLength, int $landscapeLength ) : ImageSizeReducer
   {

      if ( $portraitLength <= 0 )
      {
         throw new ArgumentError(
            'portraitLength', $portraitLength, 'Drawing.Image', 'Can not reduce an image to a empty side length!' );
      }

      if ( $landscapeLength <= 0 )
      {
         throw new ArgumentError(
            'landscapeLength', $landscapeLength, 'Drawing.Image', 'Can not reduce an image to a empty side length!' );
      }

      return ( new ImageSizeReducer( ImageSizeReducerType::SHORT_SIDE ) )
         ->setLandscape( $landscapeLength )
         ->setPortrait( $portraitLength );

   }
1068504
static public function betweenLength($value, $minLength, $maxLength, $message = null, $propertyPath = null, $encoding = 'utf8')
        {
            static::string($value, $message);

            if (mb_strlen($value, $encoding) < $minLength) {
                $message = $message ?: sprintf(
                    'Value "%s" is too short, it should have more than %d characters, but only has %d characters.',
                    static::stringify($value),
                    $minLength,
                    mb_strlen($value, $encoding)
                );

                $constraints = array('min_length' => $minLength, 'encoding' => $encoding);

                throw static::createException($value, $message, static::INVALID_MIN_LENGTH, $propertyPath, $constraints);
            }

            if (mb_strlen($value, $encoding) > $maxLength) {
                $message = $message ?: sprintf(
                    'Value "%s" is too long, it should have no more than %d characters, but has %d characters.',
                    static::stringify($value),
                    $maxLength,
                    mb_strlen($value, $encoding)
                );

                $constraints = array('max_length' => $maxLength, 'encoding' => $encoding);

                throw static::createException($value, $message, static::INVALID_MAX_LENGTH, $propertyPath, $constraints);
            }
        }
1112273
private void setLength(double length) {
        switch (type) {
            case BOX:
                box.setHeight(length);
                break;
            case CYLINDER:
                cylinder.setHeight(length);
                break;
            default:
                break;
        }
    }