Go to the documentation of this file.
32 std::size_t string_size=str.size()+1;
34 bool char_is_unsigned=
char_type.
id()==ID_unsignedbv;
42 exprt::operandst::iterator it=dest.operands().begin();
43 for(std::size_t i=0; i<string_size; i++, it++)
46 int ch=i==string_size-1?0:str[i];
49 ch = (
unsigned char)ch;
56 return std::move(dest).with_source_location(*
this);
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
string_constantt(const irep_idt &value)
The type of an expression, extends irept.
Base class for all expressions.
typet & type()
Return the type of the expression.
An expression without operands.
void set(const irep_idt &name, const irep_idt &value)
const std::string & get_string(const irep_idt &name) const
const irep_idt & id() const
bitvector_typet char_type()
array_exprt to_array_expr() const
convert string into array constant
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
bitvector_typet c_index_type()
Array constructor from list of elements.
void set_value(const irep_idt &value)
const typet & element_type() const
The type of the elements of the array.