HasPrefix asserts that the supplied string start with substr.
(substr string)
| 83 | |
| 84 | // HasPrefix asserts that the supplied string start with substr. |
| 85 | func (o OnString) HasPrefix(substr string) bool { |
| 86 | return o.Compare(o.value, "starts with", substr).Test(strings.HasPrefix(o.value, substr)) |
| 87 | } |
| 88 | |
| 89 | // HasSuffix asserts that the supplied string ends with with substr. |
| 90 | func (o OnString) HasSuffix(substr string) bool { |