MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / stripCr

Function stripCr

src/extraction/languages/c-cpp.ts:2009–2009  ·  view source on GitHub ↗
(l: string)

Source from the content-addressed store, hash-verified

2007 if (source.indexOf('__cplusplus') === -1) return source;
2008 const lines = source.split('\n');
2009 const stripCr = (l: string): string => (l.endsWith('\r') ? l.slice(0, -1) : l);
2010 let changed = false;
2011 for (let i = 0; i < lines.length; i++) {
2012 if (!C_CPLUSPLUS_GUARD_OPEN_RE.test(stripCr(lines[i] as string))) continue;

Callers 3

codeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected