Append the given string to the value, unless the value is empty.
@param {string} value - The value to append to
@returns {string} The appended result
779641
function append (value, string) {
  if (
    value === null || value === undefined || value === '' ||
    string === null || string === undefined
  ) {
    return value
  }
  return value + string
}
1076132
public static String insert(final String value, final String substr, final int index) {
        validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        validate(substr, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        if (index > value.length()) {
            return value;
        }
        return append(value.substring(0, index), substr, value.substring(index));
    }
648213
function(result, string) {

		var lastIndex = result.length - 1,
			// lastIndex may be -1, but this will eval correctly
			append_string = typeof (result[lastIndex]) == 'string';

		if (append_string) {

			result[lastIndex] += string;

		} else {

			result.push(string);

		}

	}
426971
String convertToString(Object value) {
        if (value == null) {
            return null;
        } else if (value instanceof String) {
            return (String) value;
        } else if (value instanceof List) {
            List<?> list = ((List<?>) value);
            if (list.size() == 0) {
                return EvaluationContext.EMPTY_STRING;
            } else if (list.size() == 1) {
                String strValue = String.valueOf(list.get(0));
                return escapeValue(strValue);
            } else {
                StringBuilder builder = new StringBuilder();
                Iterator<?> iterator = list.iterator();
                while (iterator.hasNext()) {
                    String strValue = String.valueOf(iterator.next());
                    strValue = escapeValue(strValue);
                    builder.append(strValue);
                    if (iterator.hasNext()) {
                        builder.append(", ");
                    }
                }
                return builder.toString();
            }
        } else if (value instanceof String[]) {
            String[] array = (String[]) value;
            if (array.length == 0) {
                return EvaluationContext.EMPTY_STRING;
            } else if (array.length == 1) {
                return escapeValue(array[0]);
            } else {
                StringBuilder builder = new StringBuilder();
                for (int i = 0; i < array.length; i++) {
                    String strValue = escapeValue(array[i]);
                    builder.append(strValue);
                    if (i + 1 < array.length) {
                        builder.append(", ");
                    }
                }
                return builder.toString();
            }
        } else if (value.getClass().isArray()) {
            int size = Array.getLength(value);
            if (size == 0) {
                return EvaluationContext.EMPTY_STRING;
            } else if (size == 1) {
                String strValue = String.valueOf(Array.get(value, 0));
                return escapeValue(strValue);
            } else {
                StringBuilder builder = new StringBuilder();
                for (int i = 0; i < size; i++) {
                    String strValue = String.valueOf(Array.get(value, i));
                    strValue = escapeValue(strValue);
                    builder.append(strValue);
                    if (i + 1 < size) {
                        builder.append(", ");
                    }
                }
                return builder.toString();
            }
        } else {
            return value.toString();
        }
    }
302015
function end (input, value) {
  if (value != null) input.push(String(value))
  input.push(null)
}
470227
public function appendValue($value)
    {
        $appendValue = $this->formatValue($value);
        $this->message = $this->message . $appendValue;

        return $this;
    }
968454
function () {
        var value = this.valueOf();

        // returns empty string if the value is
        // null or undefined or does not implement a toString
        return (!_.isNil(value) && _.isFunction(value.toString)) ? value.toString() : E;
    }
924195
function(value, text) {
      text = (typeof text == 'string')
        ? text.toLowerCase()
        : text
      ;
      value = (typeof value == 'string')
        ? value.toLowerCase()
        : value
      ;
      return (value == text);
    }
1369416
public PropertiesWriter append( final String key, final String value )
    {
        NullArgumentException.validateNotEmpty( key, "Key" );
        String valueToAdd = value;
        if( value == null )
        {
            valueToAdd = "";
        }
        Integer position = m_positions.get( key );
        List<String> values = m_values.get( key );
        if( values == null )
        {
            values = new ArrayList<String>();
            m_values.put( key, values );
        }
        values.add( valueToAdd );
        StringBuilder builder = new StringBuilder().append( key ).append( "=" );
        if( values.size() == 1 )
        {
            builder.append( valueToAdd );
        }
        else
        {
            builder.append( "\\\n" );
            String trail = null;
            for( String storedValue : values )
            {
                if( trail != null )
                {
                    builder.append( trail );
                }
                builder.append( storedValue );
                trail = m_separator + "\\\n";
            }
        }
        if( position == null )
        {
            m_content.add( builder.toString() );
            m_positions.put( key, m_content.size() - 1 );
        }
        else
        {
            m_content.set( position, builder.toString() );
        }
        return this;
    }
1035410
function(value) {

		var result = '';

		if (value) {
			result = value.toString();
			result = result[0].toUpperCase() + result.substr(1);
		}

		return result;

	}
526637
public IsEmptyBuilder append(final char value) {
        if(isNotEmpty()) {
            return this;
        }

        final String str = (value == '\u0000' ? "" : String.valueOf(value));
        return append(str);
    }
715906
private StringBuilder appendAttributeValue(final String value, final StringBuilder buf) {
      if(value.contains("\"")) {
         buf.append("\'").append(escapeAttribute(value)).append("\'");
      } else if(value.contains(" ") || value.contains("\'") || value.contains("=")) {
         buf.append("\"").append(escapeAttribute(value)).append("\"");
      } else {
         buf.append(escapeAttribute(value));
      }
      return buf;
   }
796698
public Element append(ICalDataType dataType, String value) {
		String dataTypeStr = toLocalName(dataType);
		return append(dataTypeStr, value);
	}
967310
public StrBuilder append(final String str) {
        if (str == null) {
            return appendNull();
        }
        final int strLen = str.length();
        if (strLen > 0) {
            final int len = length();
            ensureCapacity(len + strLen);
            str.getChars(0, strLen, buffer, len);
            size += strLen;
        }
        return this;
    }
139869
def append(self, value):
        

        # We inline this checks to prevent method invocation each time
        if self.children is None:
            self._parse_children()

        self.children.append(self._make_value(value))

        if self._native is not None:
            self._native.append(self.children[-1].native)

        self._mutated = True
52015
function append(key, value, req) {
  var val = this.getKey(key, req)
    , str = typeof val === 'string';
  // doesn't exist becomes the empty string
  if(val === undefined) val = new Buffer('');
  if(!(val instanceof Buffer)) val = new Buffer('' + val);
  if(!(value instanceof Buffer)) value = new Buffer('' + value);
  // coerce numbers to strings
  //val = (val + '') + value;
  //val = val.concat()
  val = Buffer.concat([val, value], val.length + value.length);
  if(str) val = val.toString();
  this.setKey(key, val, undefined, undefined, undefined, req);
  return str ? Buffer.byteLength(val) : val.length;
}
89582
public function append($value)
    {
        $value = trim($value);

        if ( ! empty($value)) {

            $hash = md5($value);
            if ( ! in_array($hash, $this->hashes)) {
                parent::append($value);
                $this->hashes[] = $hash;
            }
        }
    }