Adds the possessive s after a string.

    value = 'Hans' becomes Hans'
    and value = 'Susi' becomes Susi's
9979
def append_s(value):
    
    if value.endswith('s'):
        return u"{0}'".format(value)
    else:
        return u"{0}'s".format(value)
659959
function sanitizeTags(value, telegraf) {
  const blacklist = telegraf ? /:|\|/g : /:|\||@|,/g;
  // Replace reserved chars with underscores.
  return String(value).replace(blacklist, '_');
}
25627
function modify( $tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$operatorValue, $namedParameters, $placement )
		{
				$firstParam = $namedParameters['first_param'];
				$secondParam = $namedParameters['second_param'];
				// Example code. This code must be modified to do what the operator should do. Currently it only trims text.
				switch ( $operatorName )
				{
						case 'ngpush_xml_clean':
						{
								//trim( $operatorValue );
								$operatorValue = strip_tags($operatorValue, "<p>");
								$operatorValue = preg_replace("/(?:&nbsp;)+/", " ", $operatorValue);
								$operatorValue = preg_replace("/[ \s]+/", " ", $operatorValue);
								$operatorValue = str_replace("</p>", "", $operatorValue);
								$operatorValue = preg_replace("/<p.*?>/", "\n", $operatorValue);
								$operatorValue = preg_replace("/(?: \n)+/", "\n", $operatorValue);
								$operatorValue = preg_replace("/(?:\n )+/", "\n", $operatorValue);
								$operatorValue = trim($operatorValue);
						} break;
				}
		}
1138370
def replace(input, string, replacement = ''.freeze)
      input.to_s.gsub(string.to_s, replacement.to_s)
    end
537360
public static String entify (String text)
    {
        // this could perhaps be done more efficiently, but this function
        // is not likely to be called on large quantities of text
        // (first we turn the entified versions normal so that if text is
        // repeatedly run through this it doesn't keep changing successive
        // &'s into "&amp;".
        text = text.replace("&quot;", "\"");
        text = text.replace("&gt;", ">");
        text = text.replace("&lt;", "<");
        text = text.replace("&amp;", "&");
        text = text.replace("&", "&amp;");
        text = text.replace("<", "&lt;");
        text = text.replace(">", "&gt;");
        text = text.replace("\"", "&quot;");
        return text;
    }
661587
public void setNiceName(String value) {

        checkFrozen();
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(value)) {
            m_niceName = getName();
        } else {
            m_niceName = value.trim();
        }
    }
944982
private static String parseName(String s, StringBuilder sb) {
        sb.setLength(0);
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i); 
            switch (c) {
                case '+':
                    sb.append(' ');
                    break;
                case '%':
                    try {
                        sb.append((char) Integer.parseInt(s.substring(i+1, i+3), 
                                16));
                        i += 2;
                    } catch (NumberFormatException e) {
                        // XXX
                        // need to be more specific about illegal arg
                        throw new IllegalArgumentException();
                    } catch (StringIndexOutOfBoundsException e) {
                        String rest  = s.substring(i);
                        sb.append(rest);
                        if (rest.length()==2)
                            i++;
                        }

                        break;
                default:
                    sb.append(c);
                    break;
            }
        }

        return sb.toString();
    }
649577
function append(str, postfix) {
    if (!str && str !== 0) {
        str = '';
    } else {
        str = str.toString();
    }
    return str + postfix;
}
909623
function(s) {
      s = s.replace(/,/g, '\\,');
      s = escape(s);
      s = s.replace(/\+/g, '%2b');
      s = s.replace(/ /g, '+');
      return s;
    }
874461
private String cleanTags(String s) {
    int idx = s.indexOf("#");
    if (idx != -1) {
      s = s.substring(0, idx);
    }
    return s.trim();
  }
694829
function replace(src, token, value) {
    var idx = src.indexOf(token);
    if (idx == -1) {
        return;
    }
    return src.substr(0, idx) + value + src.substr(idx + token.length);
}
479622
def t_name(self, s):
        '
        if s in RESERVED_WORDS:
            self.add_token(s.upper(), s)
        else:
            self.add_token('NAME', s)
832840
private static Pattern replacePlaceHolders(String s) {
    s = Pattern.quote(s);
    return Pattern.compile(s.replaceAll("\\{\\d+\\}", "\\\\E.*\\\\Q"));
  }
186712
private void replaceStringsWithAliases() {
    for (Entry<String, StringInfo> entry : stringInfoMap.entrySet()) {
      String literal = entry.getKey();
      StringInfo info = entry.getValue();
      if (shouldReplaceWithAlias(literal, info)) {
        for (StringOccurrence occurrence : info.occurrences) {
          replaceStringWithAliasName(
              occurrence, info.getVariableName(literal), info);
        }
      }
    }
  }
553167
function(strVal) {
            strVal = strVal.toLowerCase();
            this.value = this.stringToHSB(strVal) ||  {
                h: 0,
                s: 0,
                b: 0,
                a: 1
            };
        }
1013030
def add_colons(s):
    
    return ':'.join([s[i:i + 2] for i in range(0, len(s), 2)])
296728
function entify(str) {
  // FIX: this is probably too many replaces in some cases and a call to it may not be needed at all in some cases
  return str.replace(/&/g, '&amp;').replace(/>/g, '&gt;').replace(/</g, '&lt;').replace(/"/g, '&quot;');
}