MCPcopy Create free account
hub / github.com/antirez/ds4 / utf8ByteLen

Function utf8ByteLen

linenoise.c:159–166  ·  view source on GitHub ↗

Return the number of bytes that compose the UTF-8 character starting at * 'c'. This function assumes a valid UTF-8 encoding and handles the four * standard byte patterns: * 0xxxxxxx -> 1 byte (ASCII) * 110xxxxx -> 2 bytes * 1110xxxx -> 3 bytes * 11110xxx -> 4 bytes */

Source from the content-addressed store, hash-verified

157 terminal_update.fd = fd;
158 terminal_update.len = 0;
159 linenoiseWrite(fd, "\x1b[?2026h", 8);
160}
161
162void linenoiseEndUpdate(void) {
163 if (!terminal_update.depth || terminal_update.depth > 1) {
164 if (terminal_update.depth) terminal_update.depth--;
165 return;
166 }
167 linenoiseWrite(terminal_update.fd, "\x1b[?2026l", 8);
168 terminal_update.depth = 0;
169 terminalWrite(terminal_update.fd, terminal_update.text, terminal_update.len);

Callers 1

linenoiseEditFeedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected