Clear the contents of the entry field and
        insert the contents of string.

        :param string: an str containing the text to display
        :return:
178085
def add(self, string: (str, list)):
        
        if len(self._entries) == 1:
            self._entries[0].delete(0, 'end')
            self._entries[0].insert(0, string)
        else:
            if len(string) != len(self._entries):
                raise ValueError('the "string" list must be '
                                 'equal to the number of entries')

            for i, e in enumerate(self._entries):
                self._entries[i].delete(0, 'end')
                self._entries[i].insert(0, string[i])
572940
def write(self, string):
        """"""
        string = string.rstrip()
        if string:  # Don't log empty lines
            self.logger.critical(string)
909316
public void addText(String str)
	{
		if (selectingText)
			deleteSelectedText();

		final StringBuilder oldText = this.text;
		final String oldValue = this.text.toString();
		String newValue = oldText.insert(this.cursor.index, str).toString();

		if (this.filterFunction != null)
			newValue = this.filterFunction.apply(newValue);

		if (!fireEvent(new ComponentEvent.ValueChange<>(this, oldValue, newValue)))
			return;

		this.text = new StringBuilder(newValue);
		guiText.setText(newValue);

		cursor.jumpBy(str.length());
	}
1037292
public void clear() {
        String cantClear = "Unable to clear ";
        String action = "Clearing text in " + prettyOutput();
        String expected = prettyOutputStart() + " is present, displayed, and enabled to have text cleared";
        try {
            if (isNotPresentDisplayedEnabledInput(action, expected, cantClear)) {
                return;
            }
            WebElement webElement = getWebElement();
            webElement.clear();
        } catch (Exception e) {
            log.warn(e);
            reporter.fail(action, expected, cantClear + prettyOutputEnd() + e.getMessage());
            return;
        }
        reporter.pass(action, expected, "Cleared text in " + prettyOutputEnd().trim());
    }
275027
protected void clearLine() {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < terminal.getWidth(); i++) {
            sb.append(" ");
        }
        console.out().print(sb.toString());
    }
458547
private String removeQuotes(String str) {
        if (str != null && !str.isEmpty()) {
            str = str.replaceAll("\"", "");
        }
        return str;
    }
356005
def replaced(self, contents):
        
        line_num = len(contents.strip(' ').splitlines())
        replace_marks = self.RE_REPLACE_MARK.findall(contents.strip())
        if len(replace_marks) == line_num:
            return False
        return True
1362934
def remove_whitespace(text_string):
    '''
    
    '''
    if text_string is None or text_string == "":
        return ""
    elif isinstance(text_string, str):
        return " ".join(text_string.split())
    else:
        raise InputError("none type or string not passed as an argument")
414360
def _reset_plain(self):
        ''''''
        if self._text:
            self._blocks.append(BlockText('\n'.join(self._text)))
        self._text.clear()
930772
def clean_value
      if (type == :string || type == :text) && !Axlsx::trust_input
        Axlsx::sanitize(::CGI.escapeHTML(@value.to_s))
      else
        @value.to_s
      end
    end
1336307
def clean_string(text):
    
    if isinstance(text, six.string_types):
        return text.translate(UNI_SPECIAL_CHARS).strip()
    return text.translate(None, STR_SPECIAL_CHARS).strip()
1235275
private String cleanUpString(String text) {
    if (StringUtils.isEmpty(text)) {
      return text;
    }
    else {
      return CONTROL_CHARS.matcher(text).replaceAll("");
    }
  }
781272
def copy(string, **kwargs):
    """"""
    window = Tk()
    window.withdraw()
    window.clipboard_clear()
    window.clipboard_append(string)
    window.destroy()
    return
567104
def clearText(self, keepFocus=False):
        """"""
        self.text = ''
        self.focus = keepFocus
        self._updateImage()
170347
def indent_string(string, *args)
      string = string.dup
      indent_string!(string, *args)
      string
    end
1027822
def trim(string):
    
    # Trailing whitespace
    string = re.sub('[ \t]*$', '', string)
    # turn '(print(+ 1 1))' to '(print (+ 1 1))'
    string = re.sub(r'''([^\\(\[, {@~`'#^])(\(|\[|{)''', r'\1 \2', string, re.X)
    # turn  ')(' to ') ('
    string = re.sub(r'(\)|\]|})(\[|\(|{)', r'\1 \2', string)
    # Remove any space before closing brackets '(print 12   )' ==> '(print 12)'
    string = re.sub('[ \t]*(\)|\]|})', r'\1', string)
    # remove extra whitespace "(print     'this)" ==> "(print 'this)"
    string = re.sub('[ \t]{2,}', ' ', string)
    # turn ') ) ) ' into '))) '
    string = re.sub(r'(\))[ \t]*(?=(\)))', r'\1', string)
    string = re.sub(r'(\])[ \t]*(?=(\]))', r'\1', string)
    string = re.sub(r'(})[ \t]*(?=(}))', r'\1', string)
    # turn '( ( ( ' into '((( '
    string = re.sub(r'(\()[ \t]*(?=(\())', r'\1', string)
    string = re.sub(r'(\[)[ \t]*(?=(\[))', r'\1', string)
    string = re.sub(r'({)[ \t]*(?=({))', r'\1', string)
    # remove leading whitespace '   print' ==> 'print'
    string = re.sub('^[ \t]*', '', string)
    # Remove space between quote and opening bracket, "' (1 2 3)" ==> "'(1 2 3)"
    string = re.sub("('|`)[ \t]+(\(|\[|{)", r'\1\2', string)
    return string
710178
def normalise_string(string):
    
    string = (string.strip()).lower()
    return re.sub(r'\W+', '_', string)