1
+ ! > The `stdlib_ascii` module provides procedures for handling and manipulating
2
+ ! > intrinsic character variables and constants.
3
+ ! >
4
+ ! > The specification of this module is available [here](../page/specs/stdlib_ascii.html).
1
5
module stdlib_ascii
2
6
3
7
implicit none
@@ -76,7 +80,7 @@ pure logical function is_alphanum(c)
76
80
end function
77
81
78
82
! > Checks whether or not `c` is in the ASCII character set -
79
- ! i.e. in the range 0 .. 0x7F.
83
+ ! > i.e. in the range 0 .. 0x7F.
80
84
pure logical function is_ascii(c)
81
85
character (len= 1 ), intent (in ) :: c ! ! The character to test.
82
86
is_ascii = iachar (c) <= int (z' 7F' )
@@ -110,8 +114,8 @@ pure logical function is_hex_digit(c)
110
114
end function
111
115
112
116
! > Checks whether or not `c` is a punctuation character. That includes
113
- ! all ASCII characters which are not control characters, letters,
114
- ! digits, or whitespace.
117
+ ! > all ASCII characters which are not control characters, letters,
118
+ ! > digits, or whitespace.
115
119
pure logical function is_punctuation(c)
116
120
character (len= 1 ), intent (in ) :: c ! ! The character to test.
117
121
integer :: ic
@@ -121,7 +125,7 @@ pure logical function is_punctuation(c)
121
125
end function
122
126
123
127
! > Checks whether or not `c` is a printable character other than the
124
- ! space character.
128
+ ! > space character.
125
129
pure logical function is_graphical(c)
126
130
character (len= 1 ), intent (in ) :: c ! ! The character to test.
127
131
integer :: ic
@@ -132,7 +136,7 @@ pure logical function is_graphical(c)
132
136
end function
133
137
134
138
! > Checks whether or not `c` is a printable character - including the
135
- ! space character.
139
+ ! > space character.
136
140
pure logical function is_printable(c)
137
141
character (len= 1 ), intent (in ) :: c ! ! The character to test.
138
142
integer :: ic
@@ -156,8 +160,8 @@ pure logical function is_upper(c)
156
160
end function
157
161
158
162
! > Checks whether or not `c` is a whitespace character. That includes the
159
- ! space, tab, vertical tab, form feed, carriage return, and linefeed
160
- ! characters.
163
+ ! > space, tab, vertical tab, form feed, carriage return, and linefeed
164
+ ! > characters.
161
165
pure logical function is_white(c)
162
166
character (len= 1 ), intent (in ) :: c ! ! The character to test.
163
167
integer :: ic
@@ -166,7 +170,7 @@ pure logical function is_white(c)
166
170
end function
167
171
168
172
! > Checks whether or not `c` is a blank character. That includes the
169
- ! only the space and tab characters
173
+ ! > only the space and tab characters
170
174
pure logical function is_blank(c)
171
175
character (len= 1 ), intent (in ) :: c ! ! The character to test.
172
176
integer :: ic
@@ -175,7 +179,7 @@ pure logical function is_blank(c)
175
179
end function
176
180
177
181
! > Returns the corresponding lowercase letter, if `c` is an uppercase
178
- ! ASCII character, otherwise `c` itself.
182
+ ! > ASCII character, otherwise `c` itself.
179
183
pure function char_to_lower (c ) result(t)
180
184
character (len= 1 ), intent (in ) :: c ! ! A character.
181
185
character (len= 1 ) :: t
@@ -191,7 +195,7 @@ pure function char_to_lower(c) result(t)
191
195
end function char_to_lower
192
196
193
197
! > Returns the corresponding uppercase letter, if `c` is a lowercase
194
- ! ASCII character, otherwise `c` itself.
198
+ ! > ASCII character, otherwise `c` itself.
195
199
pure function char_to_upper (c ) result(t)
196
200
character (len= 1 ), intent (in ) :: c ! ! A character.
197
201
character (len= 1 ) :: t
@@ -207,6 +211,8 @@ pure function char_to_upper(c) result(t)
207
211
end function char_to_upper
208
212
209
213
! > Convert character variable to lower case
214
+ ! >
215
+ ! > Version: experimental
210
216
pure function to_lower (string ) result(lower_string)
211
217
character (len=* ), intent (in ) :: string
212
218
character (len= len (string)) :: lower_string
@@ -219,6 +225,8 @@ pure function to_lower(string) result(lower_string)
219
225
end function to_lower
220
226
221
227
! > Convert character variable to upper case
228
+ ! >
229
+ ! > Version: experimental
222
230
pure function to_upper (string ) result(upper_string)
223
231
character (len=* ), intent (in ) :: string
224
232
character (len= len (string)) :: upper_string
@@ -231,6 +239,8 @@ pure function to_upper(string) result(upper_string)
231
239
end function to_upper
232
240
233
241
! > Convert character variable to title case
242
+ ! >
243
+ ! > Version: experimental
234
244
pure function to_title (string ) result(title_string)
235
245
character (len=* ), intent (in ) :: string
236
246
character (len= len (string)) :: title_string
@@ -254,6 +264,8 @@ pure function to_title(string) result(title_string)
254
264
end function to_title
255
265
256
266
! > Reverse the character order in the input character variable
267
+ ! >
268
+ ! > Version: experimental
257
269
pure function reverse (string ) result(reverse_string)
258
270
character (len=* ), intent (in ) :: string
259
271
character (len= len (string)) :: reverse_string
0 commit comments