Pretty logger
Returns beautified message
@param text
197730
function message (text) {
    const normalText = text.toLowerCase();

    if (~normalText.indexOf('warning')) {
        log.warn(text)
    } else if (~normalText.indexOf('error')) {
        log.error(text);
    } else {
        log.debug(text);
    }
}
1055683
public static String getBoldHTMLText(final String text) {
        String boldStr = null;
        if (text != null) {
            final StringBuilder updatedMsg = new StringBuilder("<b>");
            updatedMsg.append(text);
            updatedMsg.append("</b>");
            boldStr = updatedMsg.toString();
        }
        return boldStr;
    }
144363
def success(text):
    ''''''
    print(' '.join((green('✔'), white(text))))
    sys.stdout.flush()
436734
function Logger_clean(message) {
            if (Type.isString(message)) {
                replace.forEach(function (value) {
                    message = message.replace(value, '');
                });
                message = message.replace(/\\'/g, "'");
                message = message.replace(/\\n/g, "\n");
                return message.replace(/\\u001b/g, '\u001b');
            }
            return message;
        }
608787
public T text(CharSequence text, boolean goneIfEmpty) {

        if (goneIfEmpty && (text == null || text.length() == 0)) {
            return gone();
        } else {
            return text(text);
        }
    }
168907
def text(self, clean=True):
        
        if clean:
            return utils.normalise_whitespace(''.join(self).replace('\n', ' '))
        else:
            return ''.join(self)
240723
protected String postProcessing(CharSequence text) {
		final String lineContinuation = getLineContinuation();
		if (lineContinuation != null) {
			final Pattern pattern = Pattern.compile(
					"\\s*\\\\[\\n\\r]+\\s*", //$NON-NLS-1$
					Pattern.DOTALL);
			final Matcher matcher = pattern.matcher(text.toString().trim());
			return matcher.replaceAll(lineContinuation);
		}
		return text.toString().trim();
	}
822787
public int getHeight(String text) {

        m_elem.setInnerText(text);
        return CmsDomUtil.getCurrentStyleInt(m_elem, CmsDomUtil.Style.height);
    }
508077
def pretty(self, indent=1, debug=False):
        
        debug_details = ''
        if debug:
            debug_details += '<isliteral=%r, iscanonical=%r>' % (self.isliteral, self.iscanonical)
        if self.isliteral:
            pretty_literal = self.args[0].pretty(indent=0, debug=debug)
            return (' ' * indent) + '%s(%s%s)' % (self.__class__.__name__, debug_details, pretty_literal)
        else:
            return super(NOT, self).pretty(indent=indent, debug=debug)
604008
public void displayText(String text, Matrix endingTextMatrix){
        boolean hardReturn = false;
        if (lastTextLineMatrix != null && lastTextLineMatrix.get(Matrix.I32) != getCurrentTextLineMatrix().get(Matrix.I32)){
            hardReturn = true;
        }

        float currentX = getCurrentTextMatrix().get(Matrix.I31);
        if (hardReturn){
            result.append('\n');
        } else if (lastEndingTextMatrix != null){
            float lastEndX = lastEndingTextMatrix.get(Matrix.I31);
            
            float spaceGlyphWidth = gs().font.getWidth(' ')/1000f;
            float spaceWidth = (spaceGlyphWidth * gs().fontSize + gs().characterSpacing + gs().wordSpacing) * gs().horizontalScaling; // this is unscaled!!
            Matrix scaled = new Matrix(spaceWidth, 0).multiply(getCurrentTextMatrix());
            float scaledSpaceWidth = scaled.get(Matrix.I31) - getCurrentTextMatrix().get(Matrix.I31);
            
            if (currentX - lastEndX > scaledSpaceWidth/2f ){
                result.append(' ');
            }
        }
        
        if (text != null && result != null) {
        	result.append(text);
        }

        lastTextLineMatrix = getCurrentTextLineMatrix();
        lastEndingTextMatrix = endingTextMatrix;
        
    }
248109
private static String buildText(String text) {
    // <JAR><JAR> to PARAGRAPH mark in unicode
    text = doubleLineBreak.matcher(text).replaceAll(PARAGRAPH);
    // <JAR> to " "
    text = lineBreak.matcher(text).replaceAll(" ");
    return text;
  }
674901
public int getWidth(String text) {

        m_elem.setInnerText(text);
        return CmsDomUtil.getCurrentStyleInt(m_elem, CmsDomUtil.Style.width);
    }
1360656
public void newlineShowText(String text) {
        state.yTLM -= state.leading;
        showText2(text);
        content.append("'").append_i(separator);
    }
566517
public TextView getText(String text)
	{
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "getText(\""+text+"\")");
		}
		
		return getter.getView(TextView.class, text, false);
	}
1284404
def text(self, text):
        
        ret = u"".join(text.content)
        if 'url' in text.properties:
            return u"`%s`_" % ret
        if 'bold' in text.properties:
            return u"**%s**" % ret
        if 'italic' in text.properties:
            return u"*%s*" % ret
        if 'sub' in text.properties:
            return ur"\ :sub:`%s`\ " % ret
        if 'super' in text.properties:
            return ur"\ :sup:`%s`\ " % ret
        return ret
1047292
public function styleText($text)
    {
        if ($this->_outputAs == static::RAW) {
            return $text;
        }
        if ($this->_outputAs == static::PLAIN) {
            $tags = implode('|', array_keys(static::$_styles));

            return preg_replace('#</?(?:' . $tags . ')>#', '', $text);
        }

        return preg_replace_callback(
            '/<(?P<tag>[a-z0-9-_]+)>(?P<text>.*?)<\/(\1)>/ims',
            [$this, '_replaceTags'],
            $text
        );
    }
295408
function( text ) {
			if(text && this.isString(text)){
				return (text.trim())? text.trim() : text.replace(/^\s+|\s+$/g, '');
			}else{
				return '';
			}
		}