18 lines
334 B
C++
18 lines
334 B
C++
|
// Copyright 2004-present Facebook. All Rights Reserved.
|
||
|
|
||
|
#include "JSCUtils.h"
|
||
|
|
||
|
namespace facebook {
|
||
|
namespace react {
|
||
|
|
||
|
String jsStringFromBigString(const JSBigString& bigstr) {
|
||
|
if (bigstr.isAscii()) {
|
||
|
return String::createExpectingAscii(bigstr.c_str(), bigstr.size());
|
||
|
} else {
|
||
|
return String(bigstr.c_str());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|