Split right label
177468
function splitLabel(text) {
    var label = "", right = "";
    var i = text.lastIndexOf(":");
    if (i >= 0) {
        right = text.substr(i + 1).trim();
        if (right) {
            text = text.substr(0, i);
            
            i = text.lastIndexOf(" ");
            if (i >= 0) {
                label = text.substr(i + 1);
                if (label) {
                    text = text.substr(0, i);
                }
            }
        }
    }
    return [text, label, right];
}
814946
def label(self):
        """""""
        for c in self.table.columns:
            if c.parent == self.name and 'label' in c.valuetype:
                return PartitionColumn(c, self._partition)
1216830
def harmonizeLabelsTextWidth(labels, width=None):
    
    if width is None:
        width = labelsMaxTextWidth(labels)

    for label in labels:
        #label.setFixedWidth(width)
        label.setMinimumWidth(width)
928763
def choose_other_label(k, y):
    """"""
    return choice(list(set(range(1, k + 1)) - set([y])))
159156
def right_margin(self, margin):
        '''
        '''
        if margin >=1 and margin <=255:
            self.send(chr(27)+'Q'+chr(margin))
        else:
            raise RuntimeError('Invalid margin parameter in function rightMargin')
1369001
def _label(self, line):
        '''

        '''
        label = self._setup('LABEL', line)
        self.labels += [ label ]
1119644
def split_spec(spec, sep):
    """"""
    parts = spec.rsplit(sep, 1)
    spec_start = parts[0].strip()
    spec_end = ''
    if len(parts) == 2:
        spec_end = parts[-1].strip()
    return spec_start, spec_end
260390
function adjustLabelPosition(label, x, y, index) {
  const bbox = label.getBBox();
  const width = bbox.width;
  const height = bbox.height;
  const attrs = {
    x,
    y,
    textAlign: 'center'
  };
  switch (index) {
    case 0:
      attrs.y -= height / 2;
      attrs.textAlign = 'left';
      break;
    case 1:
      attrs.y -= height / 2;
      attrs.textAlign = 'right';
      break;
    case 2:
      attrs.y += height / 2;
      attrs.textAlign = 'right';
      break;
    case 3:
      attrs.y += height / 2;
      attrs.textAlign = 'left';
      break;
    case 5:
      attrs.y -= height / 2;
      break;

    case 6:
      attrs.y += height / 2;
      break;
    case 7:
      attrs.x += width / 2;
      attrs.textAlign = 'left';
      break;
    case 8:
      attrs.x -= width / 2;
      attrs.textAlign = 'right';
      break;
    default:break;
  }
  label.attr(attrs);
  return label.getBBox();
}
890475
public static String format(String label) {
        if (label.isEmpty()) {
            return label;
        }
        if(Character.isDigit(label.charAt(label.length()-1))) {
            for (int i = label.length(); i > 0; i--) {
                if(!Character.isDigit(label.charAt(i-1))) {
                    if(!Character.isLowerCase(label.charAt(i-1))) {
                        break;
                    }
                    label = label.substring(0, i) + " " + label.substring(i);
                    break;
                }
            }
        }
        return StringProcessor.formatHumanReadable(label);
    }
99901
def p_label_line_co(p):
    
    lbl = make_label(p[1], p.lineno(1))
    p[0] = make_block(lbl, p[2]) if len(p) == 3 else lbl
1234927
function () {
		var bBox = this.labelBBox, // assume getLabelSize has run at this point
			axis = this.axis,
			options = axis.options,
			labelOptions = options.labels,
			width = bBox.width,
			leftSide = width * { left: 0, center: 0.5, right: 1 }[axis.labelAlign] - labelOptions.x;

		return [-leftSide, width - leftSide];
	}
455827
def trla(label, desc = "", tokens = {}, options = {})
      tra(label, desc, tokens, options.merge(:skip_decorations => true))
    end
874474
def split_on_condition(seq, condition):
    """"""
    l1, l2 = tee((condition(item), item) for item in seq)
    return (i for p, i in l1 if p), (i for p, i in l2 if not p)
398691
def _sanitise_label_group(cls, labelgroup):
        

        if r'$\mid$' in labelgroup:
            label_components = labelgroup.split(r'$\mid$')
            good_labels = [l for l in
                           map(cls._sanitise_label, label_components)
                           if l is not None]
            if len(good_labels) == 0:
                return None
            else:
                return r'$\mid$'.join(good_labels)
        else:
            return cls._sanitise_label(labelgroup)
355753
def label(self, name, internal=False, definition=False):
        
        return "{0}{1}{2}".format(self.internal if internal else "", name, self.definition if definition else "")
775192
function label(label) {
    return function(s) {
      var delta = s.length - label.length;
      return strRepeat (' ', Math.floor (delta / 2)) + label +
             strRepeat (' ', Math.ceil (delta / 2));
    };
  }
1010341
function Tree(left, label, right) {
  this.left = left;
  this.label = label;
  this.right = right;
}