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

Should reverse be in stdlib_string? #399

Open
ivan-pi opened this issue Apr 25, 2021 · 6 comments
Open

Should reverse be in stdlib_string? #399

ivan-pi opened this issue Apr 25, 2021 · 6 comments
Labels
easy Difficulty level is easy and good for starting into this project implementation Implementation in experimental and submission of a PR topic: strings String processing

Comments

@ivan-pi
Copy link
Member

ivan-pi commented Apr 25, 2021

#310 added the reverse function to the stdlib_ascii module. Since the behavior of this function does not depend on the character set, the stdlib_string module would be a better home for it.

On the other hand the overloaded functions to_lower, to_upper, and to_title for the string_type(currently in stdlib_string_type) do implement behavior depending on the character set, and should be placed in stdlib_ascii.

cc @awvwgk

@awvwgk
Copy link
Member

awvwgk commented Apr 26, 2021

There is an issue with cyclic dependencies here. Moving reverse from stdlib_ascii to stdlib_strings requires to move the implementation in stdlib_string_type as well, same of to_lower, to_upper and to_title. Now that we have a stdlib_strings module we could think about reshuffling the procedures, leaving only inquiry functions in stdlib_ascii, the type definition + overloaded intrinsics in stdlib_string_type and everything related to string manipulation is moved to stdlib_strings.

@awvwgk awvwgk added easy Difficulty level is easy and good for starting into this project implementation Implementation in experimental and submission of a PR topic: utilities containers, strings, files, OS/environment integration, unit testing, assertions, logging, ... labels Apr 26, 2021
@awvwgk awvwgk added topic: strings String processing and removed topic: utilities containers, strings, files, OS/environment integration, unit testing, assertions, logging, ... labels Sep 18, 2021
@aniket2405
Copy link

Hello, I would like to work on this issue, if available. Thanks!

@awvwgk
Copy link
Member

awvwgk commented Feb 3, 2022

Feel free to submit a patch for this issue. If you have any questions regarding stdlib and the workflow, do not hesitate to ask, we are always happy to help.

@Pranavchiku
Copy link

Pranavchiku commented Nov 2, 2023

I feel it is implemented here: https://github.com/fortran-lang/stdlib/blob/master/src/stdlib_ascii.fypp#L336-L346, is there anything else we need for this issue?

Edit: Ahh I see, it is aimed to migrate reverse, to_lower, ... , from stdlib_ascii to stdlib_string.

@Merothiya
Copy link

I'd like to work on this issue if it is still available. Thanks.

@jvdp1
Copy link
Member

jvdp1 commented Dec 21, 2024

@Merothiya Thank you for your interest. AFAIK this issue is still available. Some work have been done (e.g., #745 ), but not finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy Difficulty level is easy and good for starting into this project implementation Implementation in experimental and submission of a PR topic: strings String processing
Projects
None yet
Development

No branches or pull requests

6 participants