Skip to content

Commit 734551d

Browse files
committed
improved documentation of to_title function
1 parent 006175d commit 734551d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

doc/specs/stdlib_string_type.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,9 @@ end program demo
11361136

11371137
#### Description
11381138

1139-
Returns a new string_type instance which holds the titlecase version of the character sequence hold by the input string.
1139+
Returns a new string_type instance which holds the titlecase (or capitalized) version of the character sequence hold by the input string.
1140+
Capitalized version: The first alphabetical character of the input character sequence is transformed to uppercase unless it
1141+
follows a numeral and the rest of the characters in the sequence are transformed to lowercase.
11401142

11411143
#### Syntax
11421144

src/stdlib_ascii.f90

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ module stdlib_ascii
7979
module procedure :: to_upper
8080
end interface to_upper
8181

82-
!> Returns a new character sequence which is the titled
82+
!> Returns a new character sequence which is the title case
8383
!> version of the input character sequence
8484
!> This method is pure and returns a character sequence
8585
interface to_title
8686
module procedure :: to_title
8787
end interface to_title
8888

89-
!> Returns a new character sequence which is the reversed
90-
!> version of the input charater sequence
89+
!> Returns a new character sequence which is reverse of
90+
!> the input charater sequence
9191
!> This method is pure and returns a character sequence
9292
interface reverse
9393
module procedure :: reverse

0 commit comments

Comments
 (0)