Trims the last space.
@return the width of the space trimmed, otherwise 0
420496
public float trimLastSpace()
    {
        BaseFont ft = font.getFont();
        if (ft.getFontType() == BaseFont.FONT_TYPE_CJK && ft.getUnicodeEquivalent(' ') != ' ') {
            if (value.length() > 1 && value.endsWith("\u0001")) {
                value = value.substring(0, value.length() - 1);
                return font.width('\u0001');
            }
        }
        else {
            if (value.length() > 1 && value.endsWith(" ")) {
                value = value.substring(0, value.length() - 1);
                return font.width(' ');
            }
        }
        return 0;
    }
609191
@Override
    public long getTotalSpace() {
        checkClosed();

        if (fatType == FatType.FAT32) {
            return bs.getNrTotalSectors() * bs.getBytesPerSector();
        }

        return -1;
    }
943320
public int getWidth ()
    {
        // Return the maximal width of our component mirages.
        int width = 0;
        for (Mirage m : _mirages) {
            width = Math.max(width, m.getWidth());
        }

        return width;
    }
638512
protected void trimLeadingWhiteSpaces()
    {
        if (shouldRemoveWhiteSpaces() && getContent().length() > 0) {
            String result = trimLeadingWhiteSpaces(getContent());
            getContent().setLength(0);
            getContent().append(result);
        }
    }
202093
public boolean skipSpaces()
    {
        while (this.pos < this.value.length() && this.value.charAt(this.pos) == ' ')
        {
            this.pos++;
        }
        return this.pos < this.value.length();
    }
1283247
public final int getRemaining()
    {
        int rem = 0;
        for (int ii=0;ii<length;ii++)
        {
            rem += srcs[offset+ii].remaining();
        }
        return rem;
    }
963507
private function getMaxWidth()
    {
        $max = 0;

        foreach ($this->getOptions() as $option) {
            $nameLength = \strlen($option->getName()) + 2;
            if ($option->getShortcut()) {
                $nameLength += \strlen($option->getShortcut()) + 3;
            }

            $max = \max($max, $nameLength);
        }

        foreach ($this->getArguments() as $argument) {
            $max = \max($max, \strlen($argument->getName()));
        }

        return ++$max;
    }
1066048
public int getMaxComponentWidth()
    {
        int maxWidth = 0;
        for (int index = 0; ; index++)
        {
            Component component = this.getComponent(index);
            if (component == null)
                break;
            if (component instanceof JTableHeader)
                continue;   // Don't use this one
            if (component instanceof JPanel)
            {   // Use the rightmost child for the width
                for (int i = 0; i < ((JPanel)component).getComponentCount(); i++)
                {
                    Component childComponent = ((JPanel)component).getComponent(i);
                    int farthestWidth = childComponent.getX() + ((JPanel)component).getComponent(i).getWidth();
                    maxWidth = Math.max(maxWidth, Math.min(component.getWidth(), farthestWidth));
                }
            }
            else
                maxWidth = Math.max(maxWidth, component.getWidth());
        }
        return maxWidth;
    }
590177
public int[] trimAndGet() {
    if (size < elementData.length) {
      elementData = Arrays.copyOf(elementData, size);
    }
    return elementData;
  }
1013444
public int getRequiredWidth() {

        Element clone = CmsDomUtil.clone(getElement());
        clone.getStyle().setPosition(Position.ABSOLUTE);
        RootPanel.getBodyElement().appendChild(clone);
        int result = clone.getOffsetWidth();
        clone.removeFromParent();
        return result;
    }
96187
public function getWidth() {
        $width = getenv('COLUMNS');
        if (false !== $width) {
            return (int)trim($width);
        }

        $dimensions = $this->getDimensions();

        return $dimensions[0] ?: 80;
    }
1250156
static int trimSpaces(char[] chars, int len) {
		// leading and trailing #x20's are removed
		int newLen = len;

		// leading
		while (newLen > 0 && chars[0] == ' ') {
			// eliminate one leading space
			shiftLeft(chars, 0, newLen);
			newLen--;
		}
		// trailing
		int i = newLen - 1;
		while (i >= 0 && chars[i] == ' ') {
			// eliminate one trailing space
			newLen--;
			i--;
		}

		return newLen;
	}
1281182
public double getArea() {
		double area = 0;
		if (!isEmpty()) {
			for (Polygon polygon : polygons) {
				area += polygon.getArea();
			}
		}
		return area;
	}
1276911
public int size() {
        int n = 0;
        int count = getRangeCount();
        for (int i = 0; i < count; ++i) {
            n += getRangeEnd(i) - getRangeStart(i) + 1;
        }
        return n + strings.size();
    }
666152
public JcString trimRight() {
		JcString ret = new JcString(null, this,
				new FunctionInstance(FUNCTION.String.RTRIM, 1));
		QueryRecorder.recordInvocationConditional(this, "trimRight", ret);
		return ret;
	}
315055
public function getFullWidth() : int {
        $first = $this->getFullStart();
        $last = $this->getEndPosition();

        return $last - $first;
    }
719846
public double getArea() {
		double area = 0;
		if (!isEmpty()) {
			area = exteriorRing.getArea();
			if (interiorRings != null) {
				for (LinearRing interiorRing : interiorRings) {
					area -= interiorRing.getArea();
				}
			}
		}
		return area;
	}