setLength(string, double) -> None

        Sets the length in m of the vehicles of this type.
962097
def setLength(self, typeID, length):
        
        self._connection._sendDoubleCmd(
            tc.CMD_SET_VEHICLETYPE_VARIABLE, tc.VAR_LENGTH, typeID, length)
698547
public void setWidth(String width) {

        try {
            m_width = Integer.parseInt(width);
        } catch (NumberFormatException e) {
            m_width = -1;
        }
    }
627554
private String limitStringLength(String str) {
    if (str.length() > MAX_STRING_LENGTH) {
      str = str.substring(0, MAX_STRING_LENGTH) + " ..."; 
    }
    return str;
  }
1358117
private void setLength(long newLength) throws IOException {
    // Set new file length (considered metadata) and sync it to storage.
    raf.setLength(newLength);
    raf.getChannel().force(true);
  }
240445
def check_length(value, length):
    
    _length = len(value)
    if _length != length:
        raise ValueError("length must be %d, not %d" % \
                         (length, _length))
75823
function intLength(num) {
		num = num.replace(/^\-/, '');
		if (~num.indexOf('.')) {
			return num.split('.')[0].length;
		}
		
		return num.length;
	}
1191507
public function setMaxLength($maxLength)
    {
        if ($this->type !== self::TYPE_STRING) {
            throw new \Exception('maxLength can only be set on type "string"');
        }

        $this->maxLength = (int) $maxLength;
    }
997310
def _determineLength(self, fObj):
        
        try:
            seek = fObj.seek
            tell = fObj.tell
        except AttributeError:
            return UNKNOWN_LENGTH
        originalPosition = tell()
        seek(0, self._SEEK_END)
        end = tell()
        seek(originalPosition, self._SEEK_SET)
        return end - originalPosition
1128569
private boolean valueLengthContains(int value, int index) {
    int initialValue = toIntUnsigned(getValue(index));
    int length = toIntUnsigned(getLength(index));

    return value <= initialValue + length;
  }
1117721
public void setMinTokenLength(int minTokenLength)
    {
        if(minTokenLength < 0)
            throw new IllegalArgumentException("Minimum token length must be non negative, not " + minTokenLength);
        if(minTokenLength > maxTokenLength)
            throw new IllegalArgumentException("Minimum token length can not exced the maximum token length");
        this.minTokenLength = minTokenLength;
    }
798326
protected void updateLength() {
		if (getBlockSets().size() == 0) {
			throw new IndexOutOfBoundsException(
					"Empty MultipleAlignment: blockSets size == 0.");
		} // Otherwise try to calculate it from the BlockSet information
		else {
			length = 0;
			for (BlockSet blockSet : blockSets)
				length += blockSet.length();
		}
	}
941164
public function setLength($length)
    {
        if ($length !== null) {
            $this->_length = (int) $length;
        } else {
            $this->_length = null;
        }

        return $this;
    }
1023493
public synchronized void updateLength(long length) {
    if (mLength == Constants.UNKNOWN_SIZE) {
      mLength = length;
    } else if (mLength != length) {
      LOG.warn("Attempting to update block length ({}) to a different length ({}).", mLength,
          length);
    }
  }
839418
def _update_length(self):
        """"""
        action_length = 4 + len(self.field.pack())
        overflow = action_length % 8
        self.length = action_length
        if overflow:
            self.length = action_length + 8 - overflow
256204
@Override
    public void setContentLength(long length) {
        this.message.setContentLength(length);
        if (this.body != null) {
            this.body.setContentLength(length);
        }
    }
322343
public function setLength($value): void
    {
        $length = is_array($value) ? $value : preg_split('\s*,\s*', $value);

        if (isset($length[0]) && !empty($length[0])) {
            $this->precision = $length[0];
        }

        if (isset($length[1]) && !empty($length[1])) {
            $this->scale = $length[1];
        }
    }
142355
public static Length of(final double length, final Unit unit) {
		requireNonNull(unit);
		return new Length(Unit.METER.convert(length, unit));
	}