FUNCTION
detect_speech
Checks for speech marks at the current offset and moves to the corresponding end of the speech marked block
Interface
#include <codecogs/strings/search/detect_speech.h>
using namespace Strings::Search;
This function looks for the existence of a speech mark, as in " or '. Upon finding either of these types of speech mark, the function will then find the corresponding end of the speech mark.
Parameters
str
This is the input string, with text that needs analysing.
offset
The location within str to search for the start of speech. If no speech is found at str[\a offset] then offset is returned.
Returns
The index immediately after the closing speech mark, or offset if str[\a offset] is not the start of a speech mark.
This function's source code is only visible to registered users — documentation and the calculator above are free to use either way. Sign in to see it.