Debian Codegraph @

doc/src/intrinsics/character/adjustl.md

raw
1 # adjustl(string): Left Adjust String
2
3 Left adjust a string.
4
5 ## Declaration
6
7 ### Syntax
8
9 ```fortran
10 retval = adjustl(string)
11 elemental function adjustl(string)
12 ```
13
14 ### Arguments
15
16 `string`: the input value must be of character type.
17
18 ### Return value
19
20 The return value is of type character and of the same kind as of input value
21 `string`, with leading spaces removed and same number of spaces appended.
22
23 ## Description
24
25 **adjustl(string)** adjusts input string by removing any leading spaces and
26 appending same number of spaces.
27
28 ## Types
29
30 Supported argument type is character.
31
32 ```fortran
33
34 interface repeat
35 module procedure repeati32, repeati64
36 end interface
37
38 contains
39
40 function adjustl(string)
41 character(len=*), intent(in) :: string
42 end function
43 ```
44
45 ## Examples
46
47 ```fortran
48 program intrinsics_adjustl
49 implicit none
50 character(*), parameter :: s1 = " A B "
51 print *, adjustl(s1)
52 end program
53 ```
54
55 **Result:**
56
57 ```
58 A B
59 ```
60
61 ## See Also
62
63 [lge](lge.md).