Skip to content

Replace startswith and endswith with stdlib calls #6299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

contificate
Copy link
Contributor

These functions were introduced in OCaml 4.13.

@psafont
Copy link
Member

psafont commented Feb 13, 2025

Coveralls upload is failing because it's under maintenance

@freddy77
Copy link
Collaborator

freddy77 commented Feb 13, 2025

The code is good. The commit message a bit misleading. Maybe Replace startswith and endswith with standard Ocaml functions ?

Minor anyway, feel free to ignore

@contificate contificate changed the title Drop startswith and endswith Replace startswith and endswith with stdlib calls Feb 13, 2025
@contificate
Copy link
Contributor Author

The code is good. The commit message a bit misleading. Maybe Replace startswith and endswith with standard Ocaml functions ?

Fair point; I've rewritten the commit message and renamed this PR (so any merge commit isn't inconsistently named).

Drops `startswith` and `endswith` from `String` (within
`xapi-stdext/xapi-stdext-std`).

These functions were introduced in OCaml 4.13:

```
String.starts_with : prefix:string -> string -> bool
```

Usage sites are adapted to supply the relevant labelled argument in each
case, e.g. ~prefix:"foo".

Signed-off-by: Colin James <[email protected]>
@psafont psafont added this pull request to the merge queue Feb 13, 2025
Merged via the queue into xapi-project:master with commit 51896da Feb 13, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants