Apply one single style on str

@param {string} str
@param {string} property
@param {string} value
@return {string}
188142
function applyStyle(str, property, value) {
    var styleDefinition = CONSOLE_STYLES[property][value];

    //No style defined return non modified string
    if (styleDefinition === null) {
        return str;
    }

    return ESCAPE + '[' + styleDefinition[0] + 'm' + str + ESCAPE + '[' + styleDefinition[1] + 'm';
}
80792
function(value) {
			var attr = this.get('class');
			value = utils.trim(value);
			if (!attr) {
				return;
			}

			var reClass = new RegExp('(^|\\s+)' + utils.escapeForRegexp(value));
			var classVal = attr.value().replace(reClass, '');
			if (!utils.trim(classVal)) {
				this.remove('class');
			} else {
				attr.value(classVal);
			}
		}
938661
def style(self, value):
        

        if value is not None:
            assert type(value) is Style, "'{0}' attribute: '{1}' type is not 'Style'!".format("style", value)
            style = Style()
            for item in (self.__default_style, value):
                style.update(item)
            value = style
        self.__style = value
471140
function styles(obj) {
  var str = '';
  for(var key in obj) {
    str += key + ':' + obj[key] + ';';
  }
  return str;
}
898610
function(element, property, values){
		values = Array.from(values);
		if (values[1] == null){
			values[1] = values[0];
			values[0] = element.getStyle(property);
		}
		var parsed = values.map(this.parse);
		return {from: parsed[0], to: parsed[1]};
	}
942053
function stringCase(str, caseValue) {
		switch (String(caseValue || '').toLowerCase()) {
			case 'lower':
				return str.toLowerCase();
			case 'upper':
				return str.toUpperCase();
		}
		
		return str;
	}
6389
function(node, att, val, style) {
        style = style || node.style;
        var CUSTOM_STYLES = Y_DOM.CUSTOM_STYLES,
            current;

        if (style) {
            if (val === null || val === '') { // normalize unsetting
                val = '';
            } else if (!isNaN(new Number(val)) && re_unit.test(att)) { // number values may need a unit
                val += Y_DOM.DEFAULT_UNIT;
            }

            if (att in CUSTOM_STYLES) {
                if (CUSTOM_STYLES[att].set) {
                    CUSTOM_STYLES[att].set(node, val, style);
                    return; // NOTE: return
                } else if (typeof CUSTOM_STYLES[att] === 'string') {
                    att = CUSTOM_STYLES[att];
                }
            }
            style[att] = val; 
        }
    }
302889
function parseFont (str) {
	str = str.trim();
	var str_o = str;
	var idx = 0;

	var style = rFontStyle.exec(str);
	style = getValue(style);
	str = str.replace(style, '').trim();

	var variant = rFontVariant.exec(str);
	variant = getValue(variant);
	str = str.replace(variant, '').trim();

	var weight = rFontWeight.exec(str);
	weight = getValue(weight);
	str = str.replace(weight, '').trim();

	var size = rFontSize.exec(str);
	// console.log('size', size);
	size = getValue(size);
	str = str.replace(size, '').trim();

	var lineHeight = rFontLineHeight.exec(str);
	lineHeight = getValue(lineHeight);
	str = str.replace(lineHeight, '').trim();
	lineHeight = lineHeight.slice(1);

	var fontFamily = str.trim();

	return {
		style: style,
		variant: variant,
		weight: weight,
		size: size,
		lineHeight: lineHeight,
		fontFamily: fontFamily,
		string: str_o
	};
}
26535
function _sanitizeStyle(value) {
    value = String(value).trim(); // Make sure it's actually a string.
    if (!value)
        return '';
    // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for
    // reasoning behind this.
    var urlMatch = value.match(URL_RE);
    if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||
        value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {
        return value; // Safe style values.
    }
    if (isDevMode()) {
        console.warn("WARNING: sanitizing unsafe style value " + value + " (see http://g.co/ng/security#xss).");
    }
    return 'unsafe';
}
1372186
public static String convertByStyle(String str, Style style) {
        switch (style) {
            case camelhump:
                return camelhumpToUnderline(str);
            case uppercase:
                return str.toUpperCase();
            case lowercase:
                return str.toLowerCase();
            case camelhumpAndLowercase:
                return camelhumpToUnderline(str).toLowerCase();
            case camelhumpAndUppercase:
                return camelhumpToUnderline(str).toUpperCase();
            case normal:
            default:
                return str;
        }
    }
660543
function( element, property )
    {
        var styles = window.getComputedStyle( element, null );

        if ( styles ) {
          // element.style[..] is undefined for browser specific styles
          // as 'filter'.
          return styles[ property ] || styles.getPropertyValue( property ) || '';
        }
        return "";
    }
667914
def style(self, value):
        """"""
        if self._style != value and \
           value in self._styles:
            self._style = value
1175070
def _parse_style_str(s):
    
    styledict = {}
    if s:
        # parses L -> R so later keys overwrite earlier ones
        for keyval in s.split(';'):
            l = keyval.strip().split(':')
            if l and len(l) == 2: styledict[l[0].strip()] = l[1].strip()
    return styledict
319718
function convertTheme(str) {
  var theme = plist.parse(str)
  theme.settings = convertArray(theme.settings)
  return theme
}
1082428
def _make_style_str(styledict):
    
    s = ''
    for key in list(styledict.keys()):
        s += "%s:%s;" % (key, styledict[key])
    return s
638780
function beautifyCode(str) {
    var beautifulStr = str;

    try {
        beautifulStr = (0, _jsBeautify.html)(str, beautifySettings);
    } catch (err) {
        console.error('Beautify error:', err.message);
    }

    return beautifulStr;
}
1143045
private function _parse_properties($str)
    {
        $properties = preg_split("/;(?=(?:[^\(]*\([^\)]*\))*(?![^\)]*\)))/", $str);
        $DEBUGCSS = $this->_dompdf->getOptions()->getDebugCss();

        if ($DEBUGCSS) {
            print '[_parse_properties';
        }

        // Create the style
        $style = new Style($this, Stylesheet::ORIG_AUTHOR);

        foreach ($properties as $prop) {
            // If the $prop contains an url, the regex may be wrong
            // @todo: fix the regex so that it works everytime
            /*if (strpos($prop, "url(") === false) {
              if (preg_match("/([a-z-]+)\s*:\s*[^:]+$/i", $prop, $m))
                $prop = $m[0];
            }*/
            //A css property can have " ! important" appended (whitespace optional)
            //strip this off to decode core of the property correctly.
            //Pass on in the style to allow proper handling:
            //!important properties can only be overridden by other !important ones.
            //$style->$prop_name = is a shortcut of $style->__set($prop_name,$value);.
            //If no specific set function available, set _props["prop_name"]
            //style is always copied completely, or $_props handled separately
            //Therefore set a _important_props["prop_name"]=true to indicate the modifier

            /* Instead of short code, prefer the typical case with fast code
          $important = preg_match("/(.*?)!\s*important/",$prop,$match);
            if ( $important ) {
              $prop = $match[1];
            }
            $prop = trim($prop);
            */
            if ($DEBUGCSS) print '(';

            $important = false;
            $prop = trim($prop);

            if (substr($prop, -9) === 'important') {
                $prop_tmp = rtrim(substr($prop, 0, -9));

                if (substr($prop_tmp, -1) === '!') {
                    $prop = rtrim(substr($prop_tmp, 0, -1));
                    $important = true;
                }
            }

            if ($prop === "") {
                if ($DEBUGCSS) print 'empty)';
                continue;
            }

            $i = mb_strpos($prop, ":");
            if ($i === false) {
                if ($DEBUGCSS) print 'novalue' . $prop . ')';
                continue;
            }

            $prop_name = rtrim(mb_strtolower(mb_substr($prop, 0, $i)));
            $value = ltrim(mb_substr($prop, $i + 1));
            if ($DEBUGCSS) print $prop_name . ':=' . $value . ($important ? '!IMPORTANT' : '') . ')';
            //New style, anyway empty
            //if ($important || !$style->important_get($prop_name) ) {
            //$style->$prop_name = array($value,$important);
            //assignment might be replaced by overloading through __set,
            //and overloaded functions might check _important_props,
            //therefore set _important_props first.
            if ($important) {
                $style->important_set($prop_name);
            }
            //For easier debugging, don't use overloading of assignments with __set
            $style->$prop_name = $value;
            //$style->props_set($prop_name, $value);
        }
        if ($DEBUGCSS) print '_parse_properties]';

        return $style;
    }