MCPcopy Create free account
hub / github.com/dmlc/dmlc-core / BackFindEndLine

Method BackFindEndLine

src/data/text_parser.h:69–75  ·  view source on GitHub ↗

! * \brief start from bptr, go backward and find first endof line * \param bptr end position to go backward * \param begin the beginning position of buffer * \return position of first endof line going backward, returns begin if not found */

Source from the content-addressed store, hash-verified

67 * \return position of first endof line going backward, returns begin if not found
68 */
69 static inline const char *BackFindEndLine(const char *bptr, const char *begin) {
70 for (; bptr != begin; --bptr) {
71 if (*bptr == '\n' || *bptr == '\r')
72 return bptr;
73 }
74 return begin;
75 }
76 /*!
77 * \brief Ignore UTF-8 BOM if present
78 * \param begin reference to begin pointer

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected