<commit_before>#ifndef HEADER_GUARD_FIND_H
#define HEADER_GUARD_FIND_H

#include "../../../src/contents.hh"

namespace vick {
namespace find {

/*!
 * \file find.hh
 * \brief Basic commands that have to do with moving until finding
 * characters
 */

/*!
 * \brief Moves forward onto a character that is interactively
 * prompted
 *
 * It moves on top of the character so that calling it again will be
 * the same as using a prefix argument of two.
 *
 * Example when using ``f`` and prefix of one (cursor is ``|``):
 * \code
 * |start of text
 * start o|f text
 * \endcode
 *
 * \param[in,out] contents The contents to move on
 * \param[in] times The number of times to find the character that the
 * user inputs interactively.
 *
 * \post ``contents.y`` didn't change
 * \post ``contents.x`` is between ``0`` and
 * ``contents.cont[contents.y].size() - 1``, inclusive
 */
boost::optional< std::shared_ptr<change> > move_forward_find_i(contents& contents, boost::optional<int> times = 1);
boost::optional< std::shared_ptr<change> > move_forward_find(contents& contents, char char_to_find, int times);
/*!
 * \brief Moves backward onto a character that is interactively
 * prompted
 *
 * It moves on top of the character so that calling it again will be
 * the same as using a prefix argument of two.
 *
 * Example when using ``f`` and prefix of one (cursor is ``|``):
 * \code
 * start of tex|t
 * start o|f text
 * \endcode
 *
 * \param[in,out] contents The contents to move on
 * \param[in] times The number of times to find the character that the
 * user inputs interactively.
 *
 * \post ``contents.y`` didn't change
 * \post ``contents.x`` is between ``0`` and
 * ``contents.cont[contents.y].size() - 1``, inclusive
 */
boost::optional< std::shared_ptr<change> > move_backward_find_i(contents& contents, boost::optional<int> times = 1);
boost::optional< std::shared_ptr<change> > move_backward_find(contents& contents, char char_to_find, int times);

/*!
 * \brief Moves forward onto a character that is interactively
 * prompted then moves back one
 *
 * It moves on top of the character so that calling it again will be
 * the same as using a prefix argument of two.
 *
 * Example when using ``f`` and prefix of one (cursor is ``|``):
 * \code
 * |start of text
 * start |of text
 * \endcode
 *
 * \param[in,out] contents The contents to move on
 * \param[in] times The number of times to find the character that the
 * user inputs interactively.
 *
 * \post ``contents.y`` didn't change
 * \post ``contents.x`` is between ``0`` and
 * ``contents.cont[contents.y].size() - 1``, inclusive
 */
boost::optional< std::shared_ptr<change> > move_forward_until_match_i(contents& contents, boost::optional<int> times = 1);
boost::optional< std::shared_ptr<change> > move_forward_until_match(contents& contents, char char_to_find, int times);
/*!
 * \brief Moves backward onto a character that is interactively
 * prompted then moves forward one
 *
 * It moves on top of the character so that calling it again will be
 * the same as using a prefix argument of two.
 *
 * Example when using ``f`` and prefix of one (cursor is ``|``):
 * \code
 * start of tex|t
 * start of| text
 * \endcode
 *
 * \param[in,out] contents The contents to move on
 * \param[in] times The number of times to find the character that the
 * user inputs interactively.
 *
 * \post ``contents.y`` didn't change
 * \post ``contents.x`` is between ``0`` and
 * ``contents.cont[contents.y].size() - 1``, inclusive
 */
boost::optional< std::shared_ptr<change> > move_backward_until_match_i(contents& contents, boost::optional<int> times = 1);
boost::optional< std::shared_ptr<change> > move_backward_until_match(contents& contents, char char_to_find, int times);
<commit_msg>Reformat (line length too long)<commit_after>#ifndef HEADER_GUARD_FIND_H
#define HEADER_GUARD_FIND_H

#include "../../../src/contents.hh"

namespace vick {
namespace find {

/*!
 * \file find.hh
 * \brief Basic commands that have to do with moving until finding
 * characters
 */

/*!
 * \brief Moves forward onto a character that is interactively
 * prompted
 *
 * It moves on top of the character so that calling it again will be
 * the same as using a prefix argument of two.
 *
 * Example when using ``f`` and prefix of one (cursor is ``|``):
 * \code
 * |start of text
 * start o|f text
 * \endcode
 *
 * \param[in,out] contents The contents to move on
 * \param[in] times The number of times to find the character that the
 * user inputs interactively.
 *
 * \post ``contents.y`` didn't change
 * \post ``contents.x`` is between ``0`` and
 * ``contents.cont[contents.y].size() - 1``, inclusive
 */
boost::optional<std::shared_ptr<change> >
move_forward_find_i(contents& contents, boost::optional<int> times = 1);

boost::optional<std::shared_ptr<change> >
move_forward_find(contents& contents, char char_to_find, int times = 1);

/*!
 * \brief Moves backward onto a character that is interactively
 * prompted
 *
 * It moves on top of the character so that calling it again will be
 * the same as using a prefix argument of two.
 *
 * Example when using ``f`` and prefix of one (cursor is ``|``):
 * \code
 * start of tex|t
 * start o|f text
 * \endcode
 *
 * \param[in,out] contents The contents to move on
 * \param[in] times The number of times to find the character that the
 * user inputs interactively.
 *
 * \post ``contents.y`` didn't change
 * \post ``contents.x`` is between ``0`` and
 * ``contents.cont[contents.y].size() - 1``, inclusive
 */
boost::optional<std::shared_ptr<change> >
move_backward_find_i(contents& contents, boost::optional<int> times = 1);

boost::optional<std::shared_ptr<change> >
move_backward_find(contents& contents, char char_to_find, int times = 1);

/*!
 * \brief Moves forward onto a character that is interactively
 * prompted then moves back one
 *
 * It moves on top of the character so that calling it again will be
 * the same as using a prefix argument of two.
 *
 * Example when using ``f`` and prefix of one (cursor is ``|``):
 * \code
 * |start of text
 * start |of text
 * \endcode
 *
 * \param[in,out] contents The contents to move on
 * \param[in] times The number of times to find the character that the
 * user inputs interactively.
 *
 * \post ``contents.y`` didn't change
 * \post ``contents.x`` is between ``0`` and
 * ``contents.cont[contents.y].size() - 1``, inclusive
 */
boost::optional<std::shared_ptr<change> >
move_forward_until_match_i(contents& contents, boost::optional<int> times = 1);

boost::optional<std::shared_ptr<change> >
move_forward_until_match(contents& contents, char char_to_find, int times = 1);

/*!
 * \brief Moves backward onto a character that is interactively
 * prompted then moves forward one
 *
 * It moves on top of the character so that calling it again will be
 * the same as using a prefix argument of two.
 *
 * Example when using ``f`` and prefix of one (cursor is ``|``):
 * \code
 * start of tex|t
 * start of| text
 * \endcode
 *
 * \param[in,out] contents The contents to move on
 * \param[in] times The number of times to find the character that the
 * user inputs interactively.
 *
 * \post ``contents.y`` didn't change
 * \post ``contents.x`` is between ``0`` and
 * ``contents.cont[contents.y].size() - 1``, inclusive
 */
boost::optional<std::shared_ptr<change> >
move_backward_until_match_i(contents& contents, boost::optional<int> times = 1);

boost::optional<std::shared_ptr<change> >
move_backward_until_match(contents& contents, char char_to_find, int times = 1);

{'fraction_non_alphanumeric': 0.12842329167774527, 'fraction_numerical': 0.003722414251528849, 'mean_word_length': 4.184700206753963, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '445267', 'n_tokens_mistral': 2304, 'n_tokens_neox': 2268, 'n_words': 872}