MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / stringLength

Function stringLength

Trash/stringTable.c:125–144  ·  view source on GitHub ↗

* compress == compress escaped characters to one character */

Source from the content-addressed store, hash-verified

123 * compress == compress escaped characters to one character
124 */
125int stringLength(char *table, INTN compress)
126{
127 int ret = 0;
128
129 while (*table)
130 {
131 if (*table == '\\')
132 {
133 table += 2;
134 ret += 1 + (compress ? 0 : 1);
135 }
136 else
137 {
138 if (*table == '\"') return ret;
139 ret++;
140 table++;
141 }
142 }
143 return ret;
144}
145
146
147// looks in table for strings of format << "key" = "value"; >>

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected