MCPcopy Create free account
hub / github.com/CyanogenMod/android_frameworks_base / offsetForString

Method offsetForString

tools/aapt/StringPool.cpp:558–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556}
557
558ssize_t StringPool::offsetForString(const String16& val) const
559{
560 const Vector<size_t>* indices = offsetsForString(val);
561 ssize_t res = indices != NULL && indices->size() > 0 ? indices->itemAt(0) : -1;
562 NOISY(printf("Offset for string %s: %d (%s)\n", String8(val).string(), res,
563 res >= 0 ? String8(mEntries[mEntryArray[res]].value).string() : String8()));
564 return res;
565}
566
567const Vector<size_t>* StringPool::offsetsForString(const String16& val) const
568{

Callers 1

flatten_nodeMethod · 0.80

Calls 2

stringMethod · 0.80
sizeMethod · 0.65

Tested by

no test coverage detected