MCPcopy Create free account
hub / github.com/acl-dev/acl / set_text

Method set_text

lib_acl_cpp/src/stdlib/json.cpp:200–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200bool json_node::set_text(const char* text)
201{
202 if (text == NULL || *text == 0) {
203 return false;
204 }
205 if (node_me_->text == NULL) {
206 return false;
207 }
208 switch ((node_me_->type & ~ACL_JSON_T_LEAF)) {
209 case ACL_JSON_T_NULL:
210 case ACL_JSON_T_BOOL:
211 case ACL_JSON_T_NUMBER:
212 case ACL_JSON_T_DOUBLE:
213 case ACL_JSON_T_STRING:
214 break;
215 default:
216 return false;
217 }
218 acl_vstring_strcpy(node_me_->text, text);
219 return true;
220}
221
222const string& json_node::to_string(string* out /* = NULL */) const
223{

Callers 10

doPostMethod · 0.80
testFunction · 0.80
test_buildFunction · 0.80
testFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
testFunction · 0.80
mainFunction · 0.80
doReplyXmlMethod · 0.80
doReplyMethod · 0.80

Calls 1

acl_vstring_strcpyFunction · 0.85

Tested by 1

test_buildFunction · 0.64