16 exprt(ID_string_constant)
22 exprt(ID_string_constant)
38 std::size_t string_size=str.size()+1;
40 bool char_is_unsigned=char_type.
id()==ID_unsignedbv;
49 exprt::operandst::iterator it=dest.
operands().begin();
50 for(std::size_t i=0; i<string_size; i++, it++)
53 int ch=i==string_size-1?0:str[i];
64 std::string ch_str=
"'";
65 if(ch==
'\'' || ch==
'\\')
67 ch_str+=
static_cast<char>(ch);
79 id(ID_string_constant);
97 value+=
static_cast<char>(unsigned_value);
102 if(!value.empty() && value[value.size()-1]==0)
103 value.resize(value.size()-1);
The type of an expression.
void set_value(const irep_idt &value)
bool from_array_expr(const array_exprt &)
convert array constant into string
const irep_idt & id() const
API to expression classes.
#define forall_operands(it, expr)
array_exprt to_array_expr() const
convert string into array constant
bitvector_typet index_type()
unsigned integer2unsigned(const mp_integer &n)
Base class for all expressions.
const std::string & get_string(const irep_namet &name) const
unsignedbv_typet unsigned_char_type()
const typet & subtype() const
signedbv_typet signed_char_type()
bitvector_typet char_type()
array constructor from list of elements