MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / find

Method find

Libraries/Plugin/Plugin.cpp:59–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57};
58
59bool SC::PluginDefinition::find(StringSpan text, StringSpan& extracted)
60{
61 size_t begin = 0;
62 SC_TRY(PluginString::find(text, "SC_BEGIN_PLUGIN", 0, begin));
63 while (begin < text.sizeInBytes() and text.bytesWithoutTerminator()[begin] != '\n')
64 ++begin;
65 SC_TRY(begin < text.sizeInBytes());
66 ++begin;
67
68 size_t end = 0;
69 SC_TRY(PluginString::find(text, "SC_END_PLUGIN", begin, end));
70 while (end > begin and text.bytesWithoutTerminator()[end - 1] != '\n')
71 --end;
72 extracted = PluginString::slice(text, begin, end - begin);
73 return true;
74}
75
76SC::Result SC::PluginDefinition::getDynamicLibraryAbsolutePath(StringPath& fullDynamicPath) const
77{

Callers 1

update_library_mdFunction · 0.45

Calls 3

sliceFunction · 0.85
findFunction · 0.50
sizeInBytesMethod · 0.45

Tested by

no test coverage detected