File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -899,6 +899,17 @@ namespace ts {
899899 return true ;
900900 }
901901
902+ /* @internal */
903+ export function startsWith ( str : string , prefix : string ) : boolean {
904+ return str . lastIndexOf ( prefix , 0 ) === 0 ;
905+ }
906+
907+ /* @internal */
908+ export function endsWith ( str : string , suffix : string ) : boolean {
909+ const expectedPos = str . length - suffix . length ;
910+ return expectedPos >= 0 && str . indexOf ( suffix , expectedPos ) === expectedPos ;
911+ }
912+
902913 export function fileExtensionIs ( path : string , extension : string ) : boolean {
903914 return path . length > extension . length && endsWith ( path , extension ) ;
904915 }
Original file line number Diff line number Diff line change @@ -3113,13 +3113,4 @@ namespace ts {
31133113 export function isParameterPropertyDeclaration ( node : ParameterDeclaration ) : boolean {
31143114 return node . flags & NodeFlags . ParameterPropertyModifier && node . parent . kind === SyntaxKind . Constructor && isClassLike ( node . parent . parent ) ;
31153115 }
3116-
3117- export function startsWith ( str : string , prefix : string ) : boolean {
3118- return str . lastIndexOf ( prefix , 0 ) === 0 ;
3119- }
3120-
3121- export function endsWith ( str : string , suffix : string ) : boolean {
3122- const expectedPos = str . length - suffix . length ;
3123- return expectedPos >= 0 && str . indexOf ( suffix , expectedPos ) === expectedPos ;
3124- }
31253116}
You can’t perform that action at this time.
0 commit comments