Skip to content
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

Procedures from iso_fortran_strings #406

Open
ivan-pi opened this issue Apr 30, 2021 · 0 comments
Open

Procedures from iso_fortran_strings #406

ivan-pi opened this issue Apr 30, 2021 · 0 comments
Labels
idea Proposition of an idea and opening an issue to discuss it topic: strings String processing

Comments

@ivan-pi
Copy link
Member

ivan-pi commented Apr 30, 2021

Description

After iso_varying_string was abandoned there were proposals like (18-259r2.txt) to keep at least some of the procedures including:

EXTRACT() copies a substring from a string

INSERT() inserts a substring into a string at a location

REMOVE() removes a substring from a string

REPLACE() replace characters by a substring (which is specified variously)

SPLIT() split a string into two where a character from a set is found

For the intrinsic character type, extracting or replacing a single substring can be achieved using sub-string indexing. I believe these functions were aimed at the string derived type. I'll edit this post with the full descriptions once I find the full Fortran committee documents.

Prior Art

We already have an issue tracking SPLIT (#241).

We also have an issue for REPLACE (#366) but I haven't checked how similar the J3 and our proposal are.

Implementation of the iso_varying_string versions can be found in Brad's repository: https://gitlab.com/everythingfunctional/iso_varying_string/-/blob/main/src/iso_varying_string.f90#L197

@ivan-pi ivan-pi added the idea Proposition of an idea and opening an issue to discuss it label Apr 30, 2021
@awvwgk awvwgk added the topic: strings String processing label Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Proposition of an idea and opening an issue to discuss it topic: strings String processing
Projects
None yet
Development

No branches or pull requests

2 participants