Sets the value of the string

        :param value:
            A unicode string
779607
def set(self, value):
        

        if not isinstance(value, str_cls):
            raise TypeError(unwrap(
                '''
                %s value must be a unicode string, not %s
                ''',
                type_name(self),
                type_name(value)
            ))

        self._unicode = value
        self.contents = iri_to_uri(value)
        self._header = None
        if self._trailer != b'':
            self._trailer = b''
821406
def set_encoded(value)
    if /^[0-9a-fA-F]*$/ !~ value
      raise ValueSpaceError.new("#{ type }: cannot accept '#{ value }'.")
    end
    @data = String.new(value).strip
    @is_nil = false
  end
112745
def setValue(self, key, value):
        
        if self._customFormat:
            self._customFormat.setValue(key, value)
        else:
            super(XSettings, self).setValue(key, wrapVariant(value))
1212530
def set_encoding(self, value=DEFAULT_ENCODING):
        
        if self._conn.encoding != value:
            self._conn.set_client_encoding(value)
228609
def setText(self, value):
        
        if isinstance(value, Text):
            self.text = value
        else:
            self.text = Text(value)
        return self
890815
void setu(String name, Object value) {
        try {
            set(name, value);
        } catch ( EvalError e ) {
            throw new InterpreterError("set: "+e, e);
        }
    }
606831
def encode(cls, value):
        
        coerced = unicode(value)
        if coerced == value and cls.PATTERN.match(coerced):
            return coerced.encode(cls._encoding)

        raise InvalidValue('not ascii')
394868
def utf8(value):
    
    if isinstance(value, _UTF8_TYPES):
        return value
    elif isinstance(value, unicode_type):
        return value.encode("utf-8")
    else:
        return str(value)
149614
def set_value(self, value):
        
        parsed_value = self._parse_value(value)
        self.value = parsed_value
273885
def set_char(key, value):
    
    global _chars
    category = _get_char_category(key)
    if not category:
        raise KeyError
    _chars[category][key] = value
1263215
def validate(self, value):
        
        val = value
        if isinstance(val, str):
            #FIXME: unsafe decoding
            val = unicode(value)
        val = super(String, self).validate(val)
        if not isinstance(val, unicode):
            raise ValueError("Not a string: %r" % (value, ))
        return val
42645
def force_unicode(value):
    
    if not isinstance(value, (str, unicode)):
        value = unicode(value)
    if isinstance(value, str):
        value = value.decode('utf-8')
    return value
1253863
def set(self, value):
        

        if isinstance(value, datetime):
            value = value.strftime('%y%m%d%H%M%SZ')
            if _PY2:
                value = value.decode('ascii')

        AbstractString.set(self, value)
        # Set it to None and let the class take care of converting the next
        # time that .native is called
        self._native = None
581754
public void setValue(String value) {
		contents = new ArrayList();
		contents.add(value);
		if (value.trim().length() > 0) {
			containsSingleString = true;
		}
	}
839838
def setValue(self, value):
        """"""
        if self.name in self._CUSTOM_INT_PARAMS:
            value = int(value)
        elif self.name in self._CUSTOM_FLOAT_PARAMS:
            value = float(value)
        elif self.name in self._CUSTOM_BOOL_PARAMS:
            value = bool(value)
        elif self.name in self._CUSTOM_INTLIST_PARAMS:
            value = readIntlist(value)
        elif self.name in self._CUSTOM_DICT_PARAMS:
            parser = Parser()
            value = parser.parse(value)
        elif self.name == "note":
            value = unicode(value)
        self._value = value
201293
def set_value(self, value):
        
        self.raw_value = self.preference.serializer.serialize(value)
596447
def url(self, value):
        

        if value is not None:
            assert type(value) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format(
                "url", value)
        self.__url = value