Determines whether the provided has the chars of the specified object at the end.
wrapper.class.ts
public isClosingIn(text: string): boolean {
return Wrapper.hasClosing(text, this.closing);
}
Parameters
text: string
The text of to test for the existence of the chars at the end of it.
Returns
The return value is a indicating whether the given has the chars of the wrap.
Example usage
// Example usage.
import { Wrapper } from '@angular-package/wrapper';
const longText = new Wrapper('{{', '}}', 'This is a long text');
const text = `Lorem ipsum and more`;
// Returns true.
longText.isClosingIn(`${text}${longText.closing}`);
// Returns false.
longText.isClosingIn(text);
// Returns false.
longText.isClosingIn(`${longText.closing}${text}`);