mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-26 12:41:06 +08:00
Added bool set_value(const char_t* rhs, size_t sz).
This commit is contained in:
parent
363ebdde91
commit
effc46f0ed
@ -5329,11 +5329,16 @@ namespace pugi
|
||||
return impl::strcpy_insitu(_attr->name, _attr->header, impl::xml_memory_page_name_allocated_mask, rhs, impl::strlength(rhs));
|
||||
}
|
||||
|
||||
PUGI__FN bool xml_attribute::set_value(const char_t* rhs)
|
||||
PUGI__FN bool xml_attribute::set_value(const char_t* rhs, size_t sz)
|
||||
{
|
||||
if (!_attr) return false;
|
||||
|
||||
return impl::strcpy_insitu(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs, impl::strlength(rhs));
|
||||
return impl::strcpy_insitu(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs, sz);
|
||||
}
|
||||
|
||||
PUGI__FN bool xml_attribute::set_value(const char_t* rhs)
|
||||
{
|
||||
return set_value(rhs, impl::strlength(rhs));
|
||||
}
|
||||
|
||||
PUGI__FN bool xml_attribute::set_value(int rhs)
|
||||
|
@ -416,6 +416,7 @@ namespace pugi
|
||||
|
||||
// Set attribute name/value (returns false if attribute is empty or there is not enough memory)
|
||||
bool set_name(const char_t* rhs);
|
||||
bool set_value(const char_t* rhs, size_t sz);
|
||||
bool set_value(const char_t* rhs);
|
||||
|
||||
// Set attribute value with type conversion (numbers are converted to strings, boolean is converted to "true"/"false")
|
||||
|
Loading…
x
Reference in New Issue
Block a user