Vesper 0.5.1
Vesper is short form for the Latin word for "Bat", as Vesper is designed to be small, lightweight, and easily handle things like particles and flocking behaviors in accordance with the nature of bats. \n It is meant to be a particle simulation, VFX editor, and CAN be used secondarily as a small game engine.
GitHub | Vesper Updates | Creator
Loading...
Searching...
No Matches
InstrumentorUtils Namespace Reference

Classes

struct  ChangeResult

Functions

template<size_t N, size_t K>
constexpr auto CleanupOutputString (const char(&expr)[N], const char(&remove)[K])

Class Documentation

◆ InstrumentorUtils::ChangeResult

struct InstrumentorUtils::ChangeResult
template<size_t N>
struct InstrumentorUtils::ChangeResult< N >
Class Members
char Data[N]

Function Documentation

◆ CleanupOutputString()

template<size_t N, size_t K>
auto InstrumentorUtils::CleanupOutputString ( const char(&) expr[N],
const char(&) remove[K] )
constexpr
191 {
192 ChangeResult<N> result = {};
193
194 size_t srcIndex = 0;
195 size_t dstIndex = 0;
196 while (srcIndex < N)
197 {
198 size_t matchIndex = 0;
199 while (matchIndex < K - 1 && srcIndex + matchIndex < N - 1 && expr[srcIndex + matchIndex] == remove[matchIndex])
200 matchIndex++;
201 if (matchIndex == K - 1)
202 srcIndex += matchIndex;
203 result.Data[dstIndex++] = expr[srcIndex] == '"' ? '\'' : expr[srcIndex];
204 srcIndex++;
205 }
206 return result;
207 }
char Data[N]
Definition Instrumentor.h:186
Definition Instrumentor.h:185