Skip to content

Extend stdlib_ascii module for handling character variables #310

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 8 commits into from
Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
  • Loading branch information
jvdp1 authored Feb 15, 2021
commit 6e9574bf209625c5c27f21462c828bf929a85ea2
4 changes: 2 additions & 2 deletions doc/specs/stdlib_ascii.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Converts input character variable to all lowercase.

#### Syntax

`res = [[stdlib_asciii(module):to_lower(function)]] (string)`
`res = [[stdlib_ascii(module):to_lower(function)]] (string)`

#### Class

Expand Down Expand Up @@ -108,7 +108,7 @@ The rest of the character sequence is transformed to lowercase.

#### Syntax

`res = [[stdlib_ascii(module):to_title(interface)]] (string)`
`res = [[stdlib_ascii(module):to_title(function)]] (string)`

#### Class

Expand Down
4 changes: 4 additions & 0 deletions src/stdlib_ascii.f90
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ pure function char_to_upper(c) result(t)
end function char_to_upper

!> Convert character variable to lower case
!> ([Specification](../page/specs/stdlib_ascii.html#to_lower))
!>
!> Version: experimental
pure function to_lower(string) result(lower_string)
Expand All @@ -225,6 +226,7 @@ pure function to_lower(string) result(lower_string)
end function to_lower

!> Convert character variable to upper case
!> ([Specification](../page/specs/stdlib_ascii.html#to_upper))
!>
!> Version: experimental
pure function to_upper(string) result(upper_string)
Expand All @@ -239,6 +241,7 @@ pure function to_upper(string) result(upper_string)
end function to_upper

!> Convert character variable to title case
!> ([Specification](../page/specs/stdlib_ascii.html#to_title))
!>
!> Version: experimental
pure function to_title(string) result(title_string)
Expand All @@ -264,6 +267,7 @@ pure function to_title(string) result(title_string)
end function to_title

!> Reverse the character order in the input character variable
!> ([Specification](../page/specs/stdlib_ascii.html#reverse))
!>
!> Version: experimental
pure function reverse(string) result(reverse_string)
Expand Down