mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[escher/text_field] Fix handling of \n
The buffer length did not take into account the \n removal. In fact, we could just remove the \n while also removing the empty code points, which is what we do now.
This commit is contained in:
@@ -20,10 +20,9 @@ bool HasCodePoint(const char * s, CodePoint c);
|
||||
* stopping at the null-terminating char or the start of string. */
|
||||
const char * NotCodePointSearch(const char * s, CodePoint c, bool goingLeft = false, const char * initialPosition = nullptr);
|
||||
|
||||
/* Copy src into dst while removing all code points c. Also update an index
|
||||
* that should be lower if code points where removed before it. Ensure null-
|
||||
/* Copy src into dst while removing all code points in codePoints. Ensure null-
|
||||
* termination of dst. */
|
||||
void CopyAndRemoveCodePoint(char * dst, size_t dstSize, const char * src, CodePoint c);
|
||||
void CopyAndRemoveCodePoints(char * dst, size_t dstSize, const char * src, CodePoint * codePoints, int numberOfCodePoints);
|
||||
|
||||
/* Remove all code points c. and update an index that should be lower if code
|
||||
* points where removed before it. Ensure null-termination of dst. */
|
||||
|
||||
Reference in New Issue
Block a user