question: public static String combineExtraStyle ( String style , String extraStyle ) { String res ; if ( style == null ) { style = "" ; } else { style = style . trim ( ) ; } if ( extraStyle == null ) { extraStyle = "" ; } else { extraStyle = extraStyle . trim ( ) ; } if ( style . isEmpty ( ) ) { if ( extraStyle . startsWith ( "=" ) || extraStyle . startsWith ( "+" ) ) { res = "+" + extraStyle . substring ( 1 ) ; } else { res = "+" + extraStyle ; } } else { if ( extraStyle . startsWith ( "=" ) || extraStyle . startsWith ( "+" ) ) { res = style + " " + extraStyle . substring ( 1 ) ; } else { res = style + " " + extraStyle ; } } return res ; }
target:  SCIPIO: Combines an extra style (like selected-style) to a main style  string (like widget-style). <p> NOTE: currently, the extra style is always added as an extra, and never replaces. The extra's prefix (+/=) is stripped. <p> ALWAYS USE THIS METHOD TO CONCATENATE EXTRA STYLES.