MCPcopy
hub / github.com/angular/angular / stripBlock

Function stripBlock

packages/localize/src/localize/src/localize.ts:178–182  ·  view source on GitHub ↗

* Strip a delimited "block" from the start of the `messagePart`, if it is found. * * If a marker character (:) actually appears in the content at the start of a tagged string or * after a substitution expression, where a block has not been provided the character must be * escaped with a backslas

(messagePart: string, rawMessagePart: string)

Source from the content-addressed store, hash-verified

176 * @throws an error if the block is unterminated
177 */
178function stripBlock(messagePart: string, rawMessagePart: string) {
179 return rawMessagePart.charAt(0) === BLOCK_MARKER
180 ? messagePart.substring(findEndOfBlock(messagePart, rawMessagePart) + 1)
181 : messagePart;
182}

Callers 1

$localizeFunction · 0.85

Calls 2

findEndOfBlockFunction · 0.90
charAtMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…