Checks for speech marks at the current offset and moves to the corresponding end of the speech marked block

You're viewing an older version of this page (#5655). View the current version.

View versions (2)

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.
GPL Licence — free for non commercial use. See Licence details.