MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / createPermanent

Method createPermanent

src/String.cpp:1242–1263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1240
1241
1242String String::createPermanent(const char *inUtf8, int length)
1243{
1244 if (!inUtf8)
1245 return String();
1246
1247 if (length<0)
1248 length = strlen(inUtf8);
1249
1250 if (!length)
1251 {
1252 return emptyString;
1253 }
1254 else if (length==1)
1255 {
1256 return String::fromCharCode( *(unsigned char *)inUtf8 );
1257 }
1258 else
1259 {
1260 String temp = create(inUtf8,length);
1261 return temp.makePermanent();
1262 }
1263}
1264
1265
1266

Callers

nothing calls this directly

Calls 1

StringClass · 0.50

Tested by

no test coverage detected