-
Notifications
You must be signed in to change notification settings - Fork 201
strings: join, to_c_char
#936
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
Conversation
|
Nice. Thank you @perazz
I prefer I will review the PR ASAP, but looks already good to me. |
I think |
jvdp1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you @perazz
Co-authored-by: Jeremie Vandenplas <[email protected]>
…nto string_utilities
Co-authored-by: Jeremie Vandenplas <[email protected]>
jalvesz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw in several places that you use cmd to refer to the output of the string manipulation. Would it be possible to use one of res, out or str ? I think cmd signals an explicit use of commands, but these implementations are much more generic than that.
Co-authored-by: jalvesz <[email protected]>
|
LGTM @perazz! Great addition, no further comments on my side :) |
This PR is spun off #911 for clarity.
Add two string utilities:
joinresult = join(strings [, separator])character(*)ortype(string_type)arrays.This simplifies string concatenation for command construction and formatted output.
to_c_charresult = to_c_char(value)Converts a Fortran string to a null-terminated C character array (
c_char), enabling interoperability with C libraries that require C-style strings.character(*)ortype(string_type)variables.to_string. maybe we should considerto_c_char? orc_charto mimic the internalcharinterface?cc: @jvdp1 @jalvesz @fortran-lang/stdlib