-
Notifications
You must be signed in to change notification settings - Fork 186
Implement to_lower, to_upper, to_title and reverse for string_type #335
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
Comments
Hey! @awvwgk , |
@aman-godara Thanks, feel free to submit a patch for this issue. Let me know if you need any help, I recommend to start with forking the stdlib repo and compiling a local version to make yourself familiar with the general workflow. The implementation itself boils down to adding |
This comment has been minimized.
This comment has been minimized.
Hey @awvwgk!, [EDIT] Should I add a new function in |
Maybe as an addition, but not as a substitute for the current interface
pure function reverse(string) result(reverse_string)
character(len=*), intent(in) :: string
character(len=len(string)) :: reverse_string
end function reverse
end interface This interface allow usage on character variables, which are in principle mutable, but in this context interface
pure subroutine reverse_inplace(string)
character(len=*), intent(inout) :: string
end subroutine reverse_inplace
end interface You can of course propose an additional in place reverse subroutine for the stdlib. |
Implementing |
What naming convention should I follow in module stdlib_string_type
use stdlib_ascii, only: to_lower, to_upper, to_title, reverse
interface to_lower1
module procedure :: to_lower_string
end interface to_lower1 This is how the interface looks at this moment. |
You can add an interface block to interface to_lower
module procedure :: to_lower
end interface to_lower |
The
stdlib_string_type
currently only implements the bare minimum functionality. To start extending the functionality the functionsto_lower
,to_upper
,to_title
andreverse
implemented instdlib_ascii
should be implemented forstdlib_string_type
as well.The text was updated successfully, but these errors were encountered: