Bug 223732 [Viewers] Rename StyledStringBuilder to StyledString
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StyledStringBuilder.java
if (startRun + 1 < endRun) {
			fStyleRuns.removeRange(startRun + 1, endRun);
		}
	}
	/**
	 * Returns an array of {@link StyleRange} resulting from applying all
	 * associated stylers for this string builder.
	 * 
	 * @return an array of all {@link StyleRange} resulting from applying the
	 *         stored stylers to this string.
	 */
	public StyleRange[] toStyleRanges() {
		if (hasRuns()) {
			ArrayList res = new ArrayList();
			List styleRuns = getStyleRuns();
			int offset = 0;
			Styler style = null;
			for (int i = 0; i < styleRuns.size(); i++) {
				StyleRun curr = (StyleRun) styleRuns.get(i);
				if (isDifferentStyle(curr.style, style)) {
					if (curr.offset > offset && style != null) {
						res.add(createStyleRange(offset, curr.offset, style));
					}
					offset = curr.offset;
					style = curr.style;
				}
			}
			if (fBuffer.length() > offset && style != null) {
				res.add(createStyleRange(offset, fBuffer.length(), style));
			}