asserts.endsWith(text, suffix)
[res, msg] = asserts.endsWith(text, suffix)
| Parameter | Description |
|---|---|
| text | Character vector or string scalar to test. |
| suffix | Expected suffix. |
| Parameter | Description |
|---|---|
| res | true if the assertion passes, false otherwise. |
| msg | assertion failure message, empty on success. |
The assertion passes when text ends with suffix.
With outputs, a missing suffix is returned as an assertion failure.
asserts.endsWith('Nelson language', 'language');
[res, msg] = asserts.endsWith('Nelson language', 'Nelson');
| Version | Description |
|---|---|
| 2.0.0 | initial version |