MCPcopy
hub / github.com/angular/angular / matchSegments

Function matchSegments

packages/router/src/url_tree.ts:585–588  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

583
584const SEGMENT_RE = /^[^\/()?;#]+/;
585function matchSegments(str: string): string {
586 const match = str.match(SEGMENT_RE);
587 return match ? match[0] : '';
588}
589
590const MATRIX_PARAM_SEGMENT_RE = /^[^\/()?;=#]+/;
591function matchMatrixKeySegments(str: string): string {

Callers 3

parseSegmentMethod · 0.85
parseParamMethod · 0.85
parseParensMethod · 0.85

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…