ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_str::getStrWrapped Interface Reference

Generate and return the input scalar string wrapped within the specified width while optionally prefixing each line and respecting the initial indentation in all subsequent lines.
More...

Detailed Description

Generate and return the input scalar string wrapped within the specified width while optionally prefixing each line and respecting the initial indentation in all subsequent lines.

Parameters
[in]str: The input scalar of type character of kind any supported by the processor (e.g., SK, SKA, SKD , or SKU) that is to be wrapped.
[in]prefix: The input scalar of the same type and kind as the input str of arbitrary length type parameter, whose contents will be prefixed to each new line (including the first line) before an indentation occurs.
Note that prefix does not count toward filling the specified width or maxwidth of each wrapped line.
(optional, default = "")
[in]indent: The input scalar of the same type and kind as the input str of arbitrary length type parameter, whose contents are the pattern (a set of characters) to search for at the beginning of each paragraph in the input str.
The repetitions of the indent at the beginning of each paragraph (including the beginning of str) collectively construct the indentation to be applied to all wrapped lines in the specific paragraph within str.
For example, the following choice of input arguments,
strWrapped = getStrWrapped(str = "~+~+This is a test.", indent = "~+")
will lead to prefixing each wrapped line in the output with ~+~+.
If indent is as an empty string, then no search for indentation character will be made and no line will be indented.
(optional, default = " ". If indent = "", then no indentation of the lines will occur.)
[in]break: The input scalar of the same type and kind as the input str of arbitrary length type parameter, whose contents are the set of characters at which breaking the input str is allowed.
Setting break = "" will lead to wrapping the input str at any arbitrary character as soon as the length of a given line reaches the specified width.
(optional, default = " ")
[in]newline: The input scalar of the same type and kind as the input str of arbitrary length type parameter, whose contents represent the dividing point between the wrapped lines in the input str.
For example, if the string contains the C-style newline character \(\ms{\n}\), then set \(\ms{newline = '\\n'}\).
Note that newline does not count toward the width or maxwidth of the wrapped line.
The presence of two adjacent newline subsrtings signals the beginning of a new paragraph.
In such a case, the indentation of the new paragraph will be computed afresh by couting the number of repetitions of the input indent pattern at the beginning of the new paragraph.
(optional, default = new_line(SKG_"a") where SKG refers to the kind of str.)
[in]linefeed: The input scalar of the same type and kind as the input str of arbitrary length type parameter, whose contents represent the linefeed to use for dividing str into separate wrapped lines.
Each line that is to be wrapped will end with a linefeed.
Additionally, all instances of newline in the input str will be replaced with linefeed in the wrapped str.
Note that linefeed does not count toward the width or maxwidth of the wrapped line.
This argument is extremely useful for fast conversion of C-style newline instances to linefeed characters while wrapping str.
See below for example usages of this input argument.
(optional, default = the input argument newline)
[in]width: The input scalar of type integer of default kind IK, representing the length of each line in the output wrapping, with the possibility of word overflows.
If a word overflows the specified input line width, it is allowed to continue in the same line until the next break character is encountered.
Note that the lengths of the input arguments prefix, newline, and linefeed do not count toward the width or maxwidth of the wrapped line.
(optional, default = 132_IK)
[in]maxwidth: The input scalar of type integer of default kind IK, representing the maximum length of each wrapped line, beyond which no character can appear (except newline).
If a word overflows the specified input maxwidth line limit, it will be broken and continued on the next line.
If break = "", then the value of maxwidth becomes irrelevant because line wrapping will strictly occur at width.
(optional, default = huge(0_IK) / 2_IK)
Returns
strWrapped : The output allocatable scalar character of the same kind as the input str, containing the input str whose contents is divided into lines of maximum width maxwidth by inserting the input newline at the appropriate positions specified via break.


Possible calling interfaces ⛓

character(:,kind(str)), allocatable :: strWrapped
strWrapped = getStrWrapped(str, prefix = prefix, indent = indent, break = break, newline = newline, linefeed = linefeed, width = width, maxwidth = maxwidth)
Generate and return the input scalar string wrapped within the specified width while optionally prefi...
Definition: pm_str.F90:1617
This module contains classes and procedures for various string manipulations and inquiries.
Definition: pm_str.F90:49
Warning
The condition len(indent) < width <= maxwidth must hold at all times.
Otherwise, appropriate adjustments to the values of width and maxWidth will be made to infinite loops.
Remarks
The procedures under discussion are impure.
This procedure exists primarily to facilitate implementation of other procedures in other modules of the library, e.g., pm_err.
It is sometimes desirable to create a list of wrapped lines instead of a single string of all wrapped lines.
Generating a list of lines can be much more expensive than a single string. But if needed, it can be done by calling setSplit and setting the argument sep to the newline argument passed to the procedures under this generic interface.
See also
display_type
getCentered
setCentered
isFailedGetShellWidth
isFailedGetShellHeight


Example usage ⛓

1program example
2
3 use pm_strASCII, only: LF ! linefeed for better display
4 use pm_kind, only: IK, LK
5 use pm_kind, only: SK ! All kinds are supported.
6 use pm_str, only: getStrWrapped
7 use pm_io, only: display_type
9
10 implicit none
11
12 character(:, SK), allocatable :: str, strWrapped
13
14 type(display_type) :: disp
15
16 disp = display_type(file = "main.out.F90")
17
18 str = "A man asked my friend Jaime Cohen: `What is the human being's funniest characteristic?` &
19‘ &Cohen said: Our contradictoriness. We are in such a hurry to grow up, and then we long for our lost childhood. &
20 &We make ourselves ill earning money, and then spend all our money on getting well again. &
21 &We think so much about the future that we neglect the present, and thus experience neither the present nor the future. &
22 &We live as if we were never going to die, and die as if we had never lived."
23
24 call disp%skip()
25 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
26 call disp%show("! Wrap string within the default 132 characters.")
27 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
28 call disp%skip()
29
30 call disp%show("str")
31 call disp%show( str, deliml = SK_"""" )
32 call disp%show("strWrapped = getStrWrapped(str)")
33 strWrapped = getStrWrapped(str)
34 call disp%show("strWrapped")
35 call disp%show( strWrapped, deliml = SK_"""" )
36 call disp%skip()
37
38 call disp%skip()
39 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
40 call disp%show("! Wrap string with an indent.")
41 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
42 call disp%skip()
43
44 call disp%show("' '//str")
45 call disp%show( ' '//str, deliml = SK_"""" )
46 call disp%show("strWrapped = getStrWrapped(' '//str)")
47 strWrapped = getStrWrapped(' '//str)
48 call disp%show("LF//strWrapped")
49 call disp%show( LF//strWrapped, deliml = SK_"""" )
50 call disp%skip()
51
52 call disp%skip()
53 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
54 call disp%show("! Wrap string with an indent and a prefix for a given non-default width.")
55 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
56 call disp%skip()
57
58 call disp%show("'....'//str")
59 call disp%show( '....'//str, deliml = SK_"""" )
60 call disp%show("strWrapped = getStrWrapped('....'//str, prefix = SK_'NOTE - ', indent = SK_'.', width = 100_IK)")
61 strWrapped = getStrWrapped('....'//str, prefix = SK_'NOTE - ', indent = SK_'.', width = 100_IK)
62 call disp%show("LF//strWrapped")
63 call disp%show( LF//strWrapped, deliml = SK_"""" )
64 call disp%skip()
65
66 call disp%skip()
67 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
68 call disp%show("! Wrap string with an indent and a prefix for a given non-default width at any character by specifying an empty `break` to ensure a precise width.")
69 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
70 call disp%skip()
71
72 call disp%show("' '//str")
73 call disp%show( ' '//str, deliml = SK_"""" )
74 call disp%show("strWrapped = getStrWrapped(' '//str, prefix = SK_'NOTE - ', indent = SK_' ', break = SK_'', width = 50_IK)")
75 strWrapped = getStrWrapped(' '//str, prefix = SK_'NOTE - ', indent = SK_' ', break = SK_'', width = 50_IK)
76 call disp%show("LF//strWrapped")
77 call disp%show( LF//strWrapped, deliml = SK_"""" )
78 call disp%skip()
79
80 call disp%skip()
81 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
82 call disp%show("! Setting a too small `width` (e.g., less than the initial indentation)can lead to awkward wrapping.")
83 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
84 call disp%skip()
85
86 call disp%show("'....'//str")
87 call disp%show( '....'//str, deliml = SK_"""" )
88 call disp%show("strWrapped = getStrWrapped(repeat(SK_'.', 8)//str, prefix = SK_'NOTE - ', indent = repeat(SK_'.', 4), width = 5_IK)")
89 strWrapped = getStrWrapped(repeat(SK_'.', 8)//str, prefix = SK_'NOTE - ', indent = repeat(SK_'.', 4), width = 5_IK)
90 call disp%show("LF//strWrapped")
91 call disp%show( LF//strWrapped, deliml = SK_"""" )
92 call disp%skip()
93
94 call disp%skip()
95 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
96 call disp%show("! Wrap string while converting all C-style newline instances (\n) to actual linefeed characters.")
97 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
98 call disp%skip()
99
100 str = "The ParaMonte serial/parallel library contains Monte Carlo routines for \n\n&
101 & + optimization, \n&
102 &+ sampling, and \n&
103 &+ integration \n\n&
104 &of mathematical objective functions of arbitrary-dimensions in particular, the posterior distributions of Bayesian models in \n\n&
105 & + data science, \n&
106 &+ Machine Learning, and \n&
107 &+ scientific inference, \n\n&
108 &with the design goal of unifying the \n&
109 & + automation (of Monte Carlo simulations), \n&
110 & + user-friendliness (of the library), \n&
111 & + accessibility (from multiple programming environments), \n&
112 & + high-performance (at runtime), and \n&
113 & + scalability (across many parallel processors)."
114
115 call disp%show("str")
116 call disp%show( str, deliml = SK_"""" )
117 call disp%show("strWrapped = getStrWrapped(str, prefix = SK_'NOTE - ', newline = '\n', linefeed = LF, width = 80_IK)")
118 strWrapped = getStrWrapped(str, prefix = SK_'NOTE - ', newline = '\n', linefeed = LF, width = 80_IK)
119 call disp%show("LF//strWrapped")
120 call disp%show( LF//strWrapped, deliml = SK_"""" )
121 call disp%skip()
122 call disp%show("strWrapped = getReplaced(getStrWrapped(str, prefix = SK_'NOTE - ', newline = '\n', width = 80_IK), pattern = '\n', replacement = LF) ! The slower verbose way of achieving the above.")
123 strWrapped = getReplaced(getStrWrapped(str, prefix = SK_'NOTE - ', newline = '\n', width = 80_IK), pattern = '\n', replacement = LF)
124 call disp%show("LF//strWrapped")
125 call disp%show( LF//strWrapped, deliml = SK_"""" )
126 call disp%skip()
127
128 str = SK_' '//str
129
130 call disp%show("str")
131 call disp%show( str, deliml = SK_"""" )
132 call disp%show("strWrapped = getStrWrapped(str, prefix = SK_'NOTE - ', newline = '\n', linefeed = LF, width = 80_IK)")
133 strWrapped = getStrWrapped(str, prefix = SK_'NOTE - ', newline = '\n', linefeed = LF, width = 80_IK)
134 call disp%show("LF//strWrapped")
135 call disp%show( LF//strWrapped, deliml = SK_"""" )
136 call disp%skip()
137 call disp%show("strWrapped = getReplaced(getStrWrapped(str, prefix = SK_'NOTE - ', newline = '\n', width = 80_IK), pattern = '\n', replacement = LF) ! The slower verbose way of achieving the above.")
138 strWrapped = getReplaced(getStrWrapped(str, prefix = SK_'NOTE - ', newline = '\n', width = 80_IK), pattern = '\n', replacement = LF)
139 call disp%show("LF//strWrapped")
140 call disp%show( LF//strWrapped, deliml = SK_"""" )
141 call disp%skip()
142
143end program example
Generate and return an arrayNew of the same type and kind as the input array, in which the requested ...
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11726
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11508
This module contains procedures and generic interfaces for replacing patterns within arrays of variou...
This module contains classes and procedures for input/output (IO) or generic display operations on st...
Definition: pm_io.F90:252
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
Definition: pm_io.F90:11393
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
Definition: pm_kind.F90:540
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Definition: pm_kind.F90:539
This module contains the uncommon and hardly representable ASCII characters as well as procedures for...
Definition: pm_strASCII.F90:61
character(1, SK), parameter LF
The scalar character constant of default kind SK of length 1 representing ASCII character: Line Feed ...
Definition: pm_strASCII.F90:93
Generate and return an object of type display_type.
Definition: pm_io.F90:10282

Example Unix compile command via Intel ifort compiler ⛓
1#!/usr/bin/env sh
2rm main.exe
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example Windows Batch compile command via Intel ifort compiler ⛓
1del main.exe
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
4main.exe

Example Unix / MinGW compile command via GNU gfortran compiler ⛓
1#!/usr/bin/env sh
2rm main.exe
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example output ⛓
1
2!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3! Wrap string within the default 132 characters.
4!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5
6str
7‘"A man asked my friend Jaime Cohen: `What is the human being's funniest characteristic?` Cohen said: Our contradictoriness. We are in such a hurry to grow up, and then we long for our lost childhood. We make ourselves ill earning money, and then spend all our money on getting well again. We think so much about the future that we neglect the present, and thus experience neither the present nor the future. We live as if we were never going to die, and die as if we had never lived."
8strWrapped = getStrWrapped(str)
9strWrapped
10‘"A man asked my friend Jaime Cohen: `What is the human being's funniest characteristic?` Cohen said: Our contradictoriness. We are
11in such a hurry to grow up, and then we long for our lost childhood. We make ourselves ill earning money, and then spend all our money
12on getting well again. We think so much about the future that we neglect the present, and thus experience neither the present nor the
13future. We live as if we were never going to die, and die as if we had never lived."
14
15
16!%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17! Wrap string with an indent.
18!%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19
20' '//str
21‘" A man asked my friend Jaime Cohen: `What is the human being's funniest characteristic?` Cohen said: Our contradictoriness. We are in such a hurry to grow up, and then we long for our lost childhood. We make ourselves ill earning money, and then spend all our money on getting well again. We think so much about the future that we neglect the present, and thus experience neither the present nor the future. We live as if we were never going to die, and die as if we had never lived."
22strWrapped = getStrWrapped(' '//str)
23LF//strWrapped
24"
25‘ A man asked my friend Jaime Cohen: `What is the human being's funniest characteristic?` Cohen said: Our contradictoriness. We
26 are in such a hurry to grow up, and then we long for our lost childhood. We make ourselves ill earning money, and then spend all
27 our money on getting well again. We think so much about the future that we neglect the present, and thus experience neither the
28 present nor the future. We live as if we were never going to die, and die as if we had never lived."
29
30
31!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
32! Wrap string with an indent and a prefix for a given non-default width.
33!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
34
35'....'//str
36‘"....A man asked my friend Jaime Cohen: `What is the human being's funniest characteristic?` Cohen said: Our contradictoriness. We are in such a hurry to grow up, and then we long for our lost childhood. We make ourselves ill earning money, and then spend all our money on getting well again. We think so much about the future that we neglect the present, and thus experience neither the present nor the future. We live as if we were never going to die, and die as if we had never lived."
37strWrapped = getStrWrapped('....'//str, prefix = SK_'NOTE - ', indent = SK_'.', width = 100_IK)
38LF//strWrapped
39"
40NOTE - ....A man asked my friend Jaime Cohen: `What is the human being's funniest characteristic?` Cohen said:
41‘NOTE - ....Our contradictoriness. We are in such a hurry to grow up, and then we long for our lost childhood.
42NOTE - ....We make ourselves ill earning money, and then spend all our money on getting well again. We think
43NOTE - ....so much about the future that we neglect the present, and thus experience neither the present nor
44NOTE - ....the future. We live as if we were never going to die, and die as if we had never lived."
45
46
47!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48! Wrap string with an indent and a prefix for a given non-default width at any character by specifying an empty `break` to ensure a precise width.
49!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
50
51' '//str
52‘" A man asked my friend Jaime Cohen: `What is the human being's funniest characteristic?` Cohen said: Our contradictoriness. We are in such a hurry to grow up, and then we long for our lost childhood. We make ourselves ill earning money, and then spend all our money on getting well again. We think so much about the future that we neglect the present, and thus experience neither the present nor the future. We live as if we were never going to die, and die as if we had never lived."
53strWrapped = getStrWrapped(' '//str, prefix = SK_'NOTE - ', indent = SK_' ', break = SK_'', width = 50_IK)
54LF//strWrapped
55"
56NOTE - A man asked my friend Jaime Cohen: `What is th
57NOTE - e human being's funniest characteristic?` Cohe
58‘NOTE - n said: Our contradictoriness. We are in su
59NOTE - ch a hurry to grow up, and then we long for ou
60NOTE - r lost childhood. We make ourselves ill earnin
61NOTE - g money, and then spend all our money on getti
62NOTE - ng well again. We think so much about the futu
63NOTE - re that we neglect the present, and thus exper
64NOTE - ience neither the present nor the future. We l
65NOTE - ive as if we were never going to die, and die
66NOTE - as if we had never lived."
67
68
69!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
70! Setting a too small `width` (e.g., less than the initial indentation)can lead to awkward wrapping.
71!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
72
73'....'//str
74‘"....A man asked my friend Jaime Cohen: `What is the human being's funniest characteristic?` Cohen said: Our contradictoriness. We are in such a hurry to grow up, and then we long for our lost childhood. We make ourselves ill earning money, and then spend all our money on getting well again. We think so much about the future that we neglect the present, and thus experience neither the present nor the future. We live as if we were never going to die, and die as if we had never lived."
75strWrapped = getStrWrapped(repeat(SK_'.', 8)//str, prefix = SK_'NOTE - ', indent = repeat(SK_'.', 4), width = 5_IK)
76LF//strWrapped
77"
78NOTE - ........A
79NOTE - ........
80NOTE - ........m
81NOTE - ........a
82NOTE - ........n
83NOTE - ........
84NOTE - ........a
85NOTE - ........s
86NOTE - ........k
87NOTE - ........e
88NOTE - ........d
89NOTE - ........
90NOTE - ........m
91NOTE - ........y
92NOTE - ........
93NOTE - ........f
94NOTE - ........r
95NOTE - ........i
96NOTE - ........e
97NOTE - ........n
98NOTE - ........d
99NOTE - ........
100NOTE - ........J
101NOTE - ........a
102NOTE - ........i
103NOTE - ........m
104NOTE - ........e
105NOTE - ........
106NOTE - ........C
107NOTE - ........o
108NOTE - ........h
109NOTE - ........e
110NOTE - ........n
111NOTE - ........:
112NOTE - ........
113NOTE - ........`
114NOTE - ........W
115NOTE - ........h
116NOTE - ........a
117NOTE - ........t
118NOTE - ........
119NOTE - ........i
120NOTE - ........s
121NOTE - ........
122NOTE - ........t
123NOTE - ........h
124NOTE - ........e
125NOTE - ........
126NOTE - ........h
127NOTE - ........u
128NOTE - ........m
129NOTE - ........a
130NOTE - ........n
131NOTE - ........
132NOTE - ........b
133NOTE - ........e
134NOTE - ........i
135NOTE - ........n
136NOTE - ........g
137NOTE - ........'
138NOTE - ........s
139NOTE - ........
140NOTE - ........f
141NOTE - ........u
142NOTE - ........n
143NOTE - ........n
144NOTE - ........i
145NOTE - ........e
146NOTE - ........s
147NOTE - ........t
148NOTE - ........
149NOTE - ........c
150NOTE - ........h
151NOTE - ........a
152NOTE - ........r
153NOTE - ........a
154NOTE - ........c
155NOTE - ........t
156NOTE - ........e
157NOTE - ........r
158NOTE - ........i
159NOTE - ........s
160NOTE - ........t
161NOTE - ........i
162NOTE - ........c
163NOTE - ........?
164NOTE - ........`
165NOTE - ........
166NOTE - ........C
167NOTE - ........o
168NOTE - ........h
169NOTE - ........e
170NOTE - ........n
171NOTE - ........
172NOTE - ........s
173NOTE - ........a
174NOTE - ........i
175NOTE - ........d
176NOTE - ........:
177NOTE - ........
178NOTE - ........â
179NOTE - ........€
180NOTE - ........˜
181NOTE - ........O
182NOTE - ........u
183NOTE - ........r
184NOTE - ........
185NOTE - ........c
186NOTE - ........o
187NOTE - ........n
188NOTE - ........t
189NOTE - ........r
190NOTE - ........a
191NOTE - ........d
192NOTE - ........i
193NOTE - ........c
194NOTE - ........t
195NOTE - ........o
196NOTE - ........r
197NOTE - ........i
198NOTE - ........n
199NOTE - ........e
200NOTE - ........s
201NOTE - ........s
202NOTE - .........
203NOTE - ........
204NOTE - ........W
205NOTE - ........e
206NOTE - ........
207NOTE - ........a
208NOTE - ........r
209NOTE - ........e
210NOTE - ........
211NOTE - ........i
212NOTE - ........n
213NOTE - ........
214NOTE - ........s
215NOTE - ........u
216NOTE - ........c
217NOTE - ........h
218NOTE - ........
219NOTE - ........a
220NOTE - ........
221NOTE - ........h
222NOTE - ........u
223NOTE - ........r
224NOTE - ........r
225NOTE - ........y
226NOTE - ........
227NOTE - ........t
228NOTE - ........o
229NOTE - ........
230NOTE - ........g
231NOTE - ........r
232NOTE - ........o
233NOTE - ........w
234NOTE - ........
235NOTE - ........u
236NOTE - ........p
237NOTE - ........,
238NOTE - ........
239NOTE - ........a
240NOTE - ........n
241NOTE - ........d
242NOTE - ........
243NOTE - ........t
244NOTE - ........h
245NOTE - ........e
246NOTE - ........n
247NOTE - ........
248NOTE - ........w
249NOTE - ........e
250NOTE - ........
251NOTE - ........l
252NOTE - ........o
253NOTE - ........n
254NOTE - ........g
255NOTE - ........
256NOTE - ........f
257NOTE - ........o
258NOTE - ........r
259NOTE - ........
260NOTE - ........o
261NOTE - ........u
262NOTE - ........r
263NOTE - ........
264NOTE - ........l
265NOTE - ........o
266NOTE - ........s
267NOTE - ........t
268NOTE - ........
269NOTE - ........c
270NOTE - ........h
271NOTE - ........i
272NOTE - ........l
273NOTE - ........d
274NOTE - ........h
275NOTE - ........o
276NOTE - ........o
277NOTE - ........d
278NOTE - .........
279NOTE - ........
280NOTE - ........W
281NOTE - ........e
282NOTE - ........
283NOTE - ........m
284NOTE - ........a
285NOTE - ........k
286NOTE - ........e
287NOTE - ........
288NOTE - ........o
289NOTE - ........u
290NOTE - ........r
291NOTE - ........s
292NOTE - ........e
293NOTE - ........l
294NOTE - ........v
295NOTE - ........e
296NOTE - ........s
297NOTE - ........
298NOTE - ........i
299NOTE - ........l
300NOTE - ........l
301NOTE - ........
302NOTE - ........e
303NOTE - ........a
304NOTE - ........r
305NOTE - ........n
306NOTE - ........i
307NOTE - ........n
308NOTE - ........g
309NOTE - ........
310NOTE - ........m
311NOTE - ........o
312NOTE - ........n
313NOTE - ........e
314NOTE - ........y
315NOTE - ........,
316NOTE - ........
317NOTE - ........a
318NOTE - ........n
319NOTE - ........d
320NOTE - ........
321NOTE - ........t
322NOTE - ........h
323NOTE - ........e
324NOTE - ........n
325NOTE - ........
326NOTE - ........s
327NOTE - ........p
328NOTE - ........e
329NOTE - ........n
330NOTE - ........d
331NOTE - ........
332NOTE - ........a
333NOTE - ........l
334NOTE - ........l
335NOTE - ........
336NOTE - ........o
337NOTE - ........u
338NOTE - ........r
339NOTE - ........
340NOTE - ........m
341NOTE - ........o
342NOTE - ........n
343NOTE - ........e
344NOTE - ........y
345NOTE - ........
346NOTE - ........o
347NOTE - ........n
348NOTE - ........
349NOTE - ........g
350NOTE - ........e
351NOTE - ........t
352NOTE - ........t
353NOTE - ........i
354NOTE - ........n
355NOTE - ........g
356NOTE - ........
357NOTE - ........w
358NOTE - ........e
359NOTE - ........l
360NOTE - ........l
361NOTE - ........
362NOTE - ........a
363NOTE - ........g
364NOTE - ........a
365NOTE - ........i
366NOTE - ........n
367NOTE - .........
368NOTE - ........
369NOTE - ........W
370NOTE - ........e
371NOTE - ........
372NOTE - ........t
373NOTE - ........h
374NOTE - ........i
375NOTE - ........n
376NOTE - ........k
377NOTE - ........
378NOTE - ........s
379NOTE - ........o
380NOTE - ........
381NOTE - ........m
382NOTE - ........u
383NOTE - ........c
384NOTE - ........h
385NOTE - ........
386NOTE - ........a
387NOTE - ........b
388NOTE - ........o
389NOTE - ........u
390NOTE - ........t
391NOTE - ........
392NOTE - ........t
393NOTE - ........h
394NOTE - ........e
395NOTE - ........
396NOTE - ........f
397NOTE - ........u
398NOTE - ........t
399NOTE - ........u
400NOTE - ........r
401NOTE - ........e
402NOTE - ........
403NOTE - ........t
404NOTE - ........h
405NOTE - ........a
406NOTE - ........t
407NOTE - ........
408NOTE - ........w
409NOTE - ........e
410NOTE - ........
411NOTE - ........n
412NOTE - ........e
413NOTE - ........g
414NOTE - ........l
415NOTE - ........e
416NOTE - ........c
417NOTE - ........t
418NOTE - ........
419NOTE - ........t
420NOTE - ........h
421NOTE - ........e
422NOTE - ........
423NOTE - ........p
424NOTE - ........r
425NOTE - ........e
426NOTE - ........s
427NOTE - ........e
428NOTE - ........n
429NOTE - ........t
430NOTE - ........,
431NOTE - ........
432NOTE - ........a
433NOTE - ........n
434NOTE - ........d
435NOTE - ........
436NOTE - ........t
437NOTE - ........h
438NOTE - ........u
439NOTE - ........s
440NOTE - ........
441NOTE - ........e
442NOTE - ........x
443NOTE - ........p
444NOTE - ........e
445NOTE - ........r
446NOTE - ........i
447NOTE - ........e
448NOTE - ........n
449NOTE - ........c
450NOTE - ........e
451NOTE - ........
452NOTE - ........n
453NOTE - ........e
454NOTE - ........i
455NOTE - ........t
456NOTE - ........h
457NOTE - ........e
458NOTE - ........r
459NOTE - ........
460NOTE - ........t
461NOTE - ........h
462NOTE - ........e
463NOTE - ........
464NOTE - ........p
465NOTE - ........r
466NOTE - ........e
467NOTE - ........s
468NOTE - ........e
469NOTE - ........n
470NOTE - ........t
471NOTE - ........
472NOTE - ........n
473NOTE - ........o
474NOTE - ........r
475NOTE - ........
476NOTE - ........t
477NOTE - ........h
478NOTE - ........e
479NOTE - ........
480NOTE - ........f
481NOTE - ........u
482NOTE - ........t
483NOTE - ........u
484NOTE - ........r
485NOTE - ........e
486NOTE - .........
487NOTE - ........
488NOTE - ........W
489NOTE - ........e
490NOTE - ........
491NOTE - ........l
492NOTE - ........i
493NOTE - ........v
494NOTE - ........e
495NOTE - ........
496NOTE - ........a
497NOTE - ........s
498NOTE - ........
499NOTE - ........i
500NOTE - ........f
501NOTE - ........
502NOTE - ........w
503NOTE - ........e
504NOTE - ........
505NOTE - ........w
506NOTE - ........e
507NOTE - ........r
508NOTE - ........e
509NOTE - ........
510NOTE - ........n
511NOTE - ........e
512NOTE - ........v
513NOTE - ........e
514NOTE - ........r
515NOTE - ........
516NOTE - ........g
517NOTE - ........o
518NOTE - ........i
519NOTE - ........n
520NOTE - ........g
521NOTE - ........
522NOTE - ........t
523NOTE - ........o
524NOTE - ........
525NOTE - ........d
526NOTE - ........i
527NOTE - ........e
528NOTE - ........,
529NOTE - ........
530NOTE - ........a
531NOTE - ........n
532NOTE - ........d
533NOTE - ........
534NOTE - ........d
535NOTE - ........i
536NOTE - ........e
537NOTE - ........
538NOTE - ........a
539NOTE - ........s
540NOTE - ........
541NOTE - ........i
542NOTE - ........f
543NOTE - ........
544NOTE - ........w
545NOTE - ........e
546NOTE - ........
547NOTE - ........h
548NOTE - ........a
549NOTE - ........d
550NOTE - ........
551NOTE - ........n
552NOTE - ........e
553NOTE - ........v
554NOTE - ........e
555NOTE - ........r
556NOTE - ........
557NOTE - ........l
558NOTE - ........i
559NOTE - ........v
560NOTE - ........e
561NOTE - ........d
562NOTE - .........
563NOTE - ........"
564
565
566!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
567! Wrap string while converting all C-style newline instances (\n) to actual linefeed characters.
568!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
569
570str
571"The ParaMonte serial/parallel library contains Monte Carlo routines for \n\n + optimization, \n+ sampling, and \n+ integration \n\nof mathematical objective functions of arbitrary-dimensions in particular, the posterior distributions of Bayesian models in \n\n + data science, \n+ Machine Learning, and \n+ scientific inference, \n\nwith the design goal of unifying the \n + automation (of Monte Carlo simulations), \n + user-friendliness (of the library), \n + accessibility (from multiple programming environments), \n + high-performance (at runtime), and \n + scalability (across many parallel processors)."
572strWrapped = getStrWrapped(str, prefix = SK_'NOTE - ', newline = '\n', linefeed = LF, width = 80_IK)
573LF//strWrapped
574"
575NOTE - The ParaMonte serial/parallel library contains Monte Carlo routines for
576NOTE -
577NOTE - + optimization,
578NOTE - + sampling, and
579NOTE - + integration
580NOTE -
581NOTE - of mathematical objective functions of arbitrary-dimensions in particular, the posterior
582NOTE - distributions of Bayesian models in
583NOTE -
584NOTE - + data science,
585NOTE - + Machine Learning, and
586NOTE - + scientific inference,
587NOTE -
588NOTE - with the design goal of unifying the
589NOTE - + automation (of Monte Carlo simulations),
590NOTE - + user-friendliness (of the library),
591NOTE - + accessibility (from multiple programming environments),
592NOTE - + high-performance (at runtime), and
593NOTE - + scalability (across many parallel processors)."
594
595strWrapped = getReplaced(getStrWrapped(str, prefix = SK_'NOTE - ', newline = '\n', width = 80_IK), pattern = '\n', replacement = LF) ! The slower verbose way of achieving the above.
596LF//strWrapped
597"
598NOTE - The ParaMonte serial/parallel library contains Monte Carlo routines for
599NOTE -
600NOTE - + optimization,
601NOTE - + sampling, and
602NOTE - + integration
603NOTE -
604NOTE - of mathematical objective functions of arbitrary-dimensions in particular, the posterior
605NOTE - distributions of Bayesian models in
606NOTE -
607NOTE - + data science,
608NOTE - + Machine Learning, and
609NOTE - + scientific inference,
610NOTE -
611NOTE - with the design goal of unifying the
612NOTE - + automation (of Monte Carlo simulations),
613NOTE - + user-friendliness (of the library),
614NOTE - + accessibility (from multiple programming environments),
615NOTE - + high-performance (at runtime), and
616NOTE - + scalability (across many parallel processors)."
617
618str
619" The ParaMonte serial/parallel library contains Monte Carlo routines for \n\n + optimization, \n+ sampling, and \n+ integration \n\nof mathematical objective functions of arbitrary-dimensions in particular, the posterior distributions of Bayesian models in \n\n + data science, \n+ Machine Learning, and \n+ scientific inference, \n\nwith the design goal of unifying the \n + automation (of Monte Carlo simulations), \n + user-friendliness (of the library), \n + accessibility (from multiple programming environments), \n + high-performance (at runtime), and \n + scalability (across many parallel processors)."
620strWrapped = getStrWrapped(str, prefix = SK_'NOTE - ', newline = '\n', linefeed = LF, width = 80_IK)
621LF//strWrapped
622"
623NOTE - The ParaMonte serial/parallel library contains Monte Carlo routines for
624NOTE -
625NOTE - + optimization,
626NOTE - + sampling, and
627NOTE - + integration
628NOTE -
629NOTE - of mathematical objective functions of arbitrary-dimensions in particular, the posterior
630NOTE - distributions of Bayesian models in
631NOTE -
632NOTE - + data science,
633NOTE - + Machine Learning, and
634NOTE - + scientific inference,
635NOTE -
636NOTE - with the design goal of unifying the
637NOTE - + automation (of Monte Carlo simulations),
638NOTE - + user-friendliness (of the library),
639NOTE - + accessibility (from multiple programming environments),
640NOTE - + high-performance (at runtime), and
641NOTE - + scalability (across many parallel processors)."
642
643strWrapped = getReplaced(getStrWrapped(str, prefix = SK_'NOTE - ', newline = '\n', width = 80_IK), pattern = '\n', replacement = LF) ! The slower verbose way of achieving the above.
644LF//strWrapped
645"
646NOTE - The ParaMonte serial/parallel library contains Monte Carlo routines for
647NOTE -
648NOTE - + optimization,
649NOTE - + sampling, and
650NOTE - + integration
651NOTE -
652NOTE - of mathematical objective functions of arbitrary-dimensions in particular, the posterior
653NOTE - distributions of Bayesian models in
654NOTE -
655NOTE - + data science,
656NOTE - + Machine Learning, and
657NOTE - + scientific inference,
658NOTE -
659NOTE - with the design goal of unifying the
660NOTE - + automation (of Monte Carlo simulations),
661NOTE - + user-friendliness (of the library),
662NOTE - + accessibility (from multiple programming environments),
663NOTE - + high-performance (at runtime), and
664NOTE - + scalability (across many parallel processors)."
665
666
Test:
test_pm_str


Final Remarks ⛓


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, Tuesday March 7, 2017, 3:50 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin

Definition at line 1617 of file pm_str.F90.


The documentation for this interface was generated from the following file: