ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_str.F90
Go to the documentation of this file.
1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3!!!! !!!!
4!!!! ParaMonte: Parallel Monte Carlo and Machine Learning Library. !!!!
5!!!! !!!!
6!!!! Copyright (C) 2012-present, The Computational Data Science Lab !!!!
7!!!! !!!!
8!!!! This file is part of the ParaMonte library. !!!!
9!!!! !!!!
10!!!! LICENSE !!!!
11!!!! !!!!
12!!!! https://github.com/cdslaborg/paramonte/blob/main/LICENSE.md !!!!
13!!!! !!!!
14!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
46
47!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48
49module pm_str
50
51 use pm_kind, only: SK, IK, LK
52 use pm_container, only: css_type
53#if PDT_ENABLED
54 use pm_container, only: css_pdt
55#endif
56
57!#if SK5_ENABLED
58! use pm_arraySplit, only: setSplit_D0_D0_SK5, setSplitCustom_D0_D0_SK5, setSplitInstance_D0_D0_SK5, setSplitCustomInstance_D0_D0_SK5
59!#endif
60!
61!#if SK4_ENABLED
62! use pm_arraySplit, only: setSplit_D0_D0_SK4, setSplitCustom_D0_D0_SK4, setSplitInstance_D0_D0_SK4, setSplitCustomInstance_D0_D0_SK4
63!#endif
64!
65!#if SK3_ENABLED
66! use pm_arraySplit, only: setSplit_D0_D0_SK3, setSplitCustom_D0_D0_SK3, setSplitInstance_D0_D0_SK3, setSplitCustomInstance_D0_D0_SK3
67!#endif
68!
69!#if SK2_ENABLED
70! use pm_arraySplit, only: setSplit_D0_D0_SK2, setSplitCustom_D0_D0_SK2, setSplitInstance_D0_D0_SK2, setSplitCustomInstance_D0_D0_SK2
71!#endif
72!
73!#if SK1_ENABLED
74! use pm_arraySplit, only: setSplit_D0_D0_SK1, setSplitCustom_D0_D0_SK1, setSplitInstance_D0_D0_SK1, setSplitCustomInstance_D0_D0_SK1
75!#endif
76
77 implicit none
78
79 character(*, SK), parameter :: MODULE_NAME = "@pm_str"
80
81!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
82
83 character(*, SK), parameter :: SPACE = SK_" "
84#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
85 !DIR$ ATTRIBUTES DLLEXPORT :: SPACE
86#endif
87
88 character(*, SK), parameter :: NLC = new_line(SK_"a")
89#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
90 !DIR$ ATTRIBUTES DLLEXPORT :: NLC
91#endif
92
93 character(*, SK), parameter :: UNDEFINED = SK_"UNDEFINED"
94#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
95 !DIR$ ATTRIBUTES DLLEXPORT :: UNDEFINED
96#endif
97
98 ! Intel compilers cannot apply `minval()` or `maxval()` to empty character array constants as of 2022.
99 ! Until this internal compiler bug is resolved, the following constants are commented out.
100 !character(*, SK), parameter :: COL_SEQ_BEG = maxval([character(1,SK)::],1) !< \public The scalar `character` parameter of default kind \SK containing the first character in the processor collating sequence.
101 !character(*, SK), parameter :: COL_SEQ_END = minval([character(1,SK)::],1) !< \public The scalar `character` parameter of default kind \SK containing the final character in the processor collating sequence.
102
103!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
104
162 interface operator(.alleq.)
163
164 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
165
166#if SK5_ENABLED
167 pure elemental module function alleq_SK5(str1, str2) result(allEqual)
168#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
169 !DEC$ ATTRIBUTES DLLEXPORT :: alleq_SK5
170#endif
171 use pm_kind, only: SKG => SK5
172 character(*,SKG), intent(in) :: str1, str2
173 logical(LK) :: allEqual
174 end function
175#endif
176
177#if SK4_ENABLED
178 pure elemental module function alleq_SK4(str1, str2) result(allEqual)
179#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
180 !DEC$ ATTRIBUTES DLLEXPORT :: alleq_SK4
181#endif
182 use pm_kind, only: SKG => SK4
183 character(*,SKG), intent(in) :: str1, str2
184 logical(LK) :: allEqual
185 end function
186#endif
187
188#if SK3_ENABLED
189 pure elemental module function alleq_SK3(str1, str2) result(allEqual)
190#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
191 !DEC$ ATTRIBUTES DLLEXPORT :: alleq_SK3
192#endif
193 use pm_kind, only: SKG => SK3
194 character(*,SKG), intent(in) :: str1, str2
195 logical(LK) :: allEqual
196 end function
197#endif
198
199#if SK2_ENABLED
200 pure elemental module function alleq_SK2(str1, str2) result(allEqual)
201#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
202 !DEC$ ATTRIBUTES DLLEXPORT :: alleq_SK2
203#endif
204 use pm_kind, only: SKG => SK2
205 character(*,SKG), intent(in) :: str1, str2
206 logical(LK) :: allEqual
207 end function
208#endif
209
210#if SK1_ENABLED
211 pure elemental module function alleq_SK1(str1, str2) result(allEqual)
212#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
213 !DEC$ ATTRIBUTES DLLEXPORT :: alleq_SK1
214#endif
215 use pm_kind, only: SKG => SK1
216 character(*,SKG), intent(in) :: str1, str2
217 logical(LK) :: allEqual
218 end function
219#endif
220
221 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
222
223 end interface
224
225!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
226
294 interface isEndedWith
295
296 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
297
298#if SK5_ENABLED
299 pure elemental module function isEndedWith_SK5(str, suffix) result(endedWith)
300#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
301 !DEC$ ATTRIBUTES DLLEXPORT :: isEndedWith_SK5
302#endif
303 use pm_kind, only: SKG => SK5
304 character(*,SKG) , intent(in) :: str, suffix
305 logical(LK) :: endedWith
306 end function
307#endif
308
309#if SK4_ENABLED
310 pure elemental module function isEndedWith_SK4(str, suffix) result(endedWith)
311#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
312 !DEC$ ATTRIBUTES DLLEXPORT :: isEndedWith_SK4
313#endif
314 use pm_kind, only: SKG => SK4
315 character(*,SKG) , intent(in) :: str, suffix
316 logical(LK) :: endedWith
317 end function
318#endif
319
320#if SK3_ENABLED
321 pure elemental module function isEndedWith_SK3(str, suffix) result(endedWith)
322#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
323 !DEC$ ATTRIBUTES DLLEXPORT :: isEndedWith_SK3
324#endif
325 use pm_kind, only: SKG => SK3
326 character(*,SKG) , intent(in) :: str, suffix
327 logical(LK) :: endedWith
328 end function
329#endif
330
331#if SK2_ENABLED
332 pure elemental module function isEndedWith_SK2(str, suffix) result(endedWith)
333#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
334 !DEC$ ATTRIBUTES DLLEXPORT :: isEndedWith_SK2
335#endif
336 use pm_kind, only: SKG => SK2
337 character(*,SKG) , intent(in) :: str, suffix
338 logical(LK) :: endedWith
339 end function
340#endif
341
342#if SK1_ENABLED
343 pure elemental module function isEndedWith_SK1(str, suffix) result(endedWith)
344#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
345 !DEC$ ATTRIBUTES DLLEXPORT :: isEndedWith_SK1
346#endif
347 use pm_kind, only: SKG => SK1
348 character(*,SKG) , intent(in) :: str, suffix
349 logical(LK) :: endedWith
350 end function
351#endif
352
353 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
354
355#if PDT_ENABLED
356
357#if SK5_ENABLED
358 pure elemental module function isEndedWith_PSSK5(str, suffix) result(endedWith)
359#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
360 !DEC$ ATTRIBUTES DLLEXPORT :: isEndedWith_PSSK5
361#endif
362 use pm_kind, only: SKG => SK5
363 type(css_pdt(SKG)) , intent(in) :: str, suffix
364 logical(LK) :: endedWith
365 end function
366#endif
367
368#if SK4_ENABLED
369 pure elemental module function isEndedWith_PSSK4(str, suffix) result(endedWith)
370#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
371 !DEC$ ATTRIBUTES DLLEXPORT :: isEndedWith_PSSK4
372#endif
373 use pm_kind, only: SKG => SK4
374 type(css_pdt(SKG)) , intent(in) :: str, suffix
375 logical(LK) :: endedWith
376 end function
377#endif
378
379#if SK3_ENABLED
380 pure elemental module function isEndedWith_PSSK3(str, suffix) result(endedWith)
381#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
382 !DEC$ ATTRIBUTES DLLEXPORT :: isEndedWith_PSSK3
383#endif
384 use pm_kind, only: SKG => SK3
385 type(css_pdt(SKG)) , intent(in) :: str, suffix
386 logical(LK) :: endedWith
387 end function
388#endif
389
390#if SK2_ENABLED
391 pure elemental module function isEndedWith_PSSK2(str, suffix) result(endedWith)
392#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
393 !DEC$ ATTRIBUTES DLLEXPORT :: isEndedWith_PSSK2
394#endif
395 use pm_kind, only: SKG => SK2
396 type(css_pdt(SKG)) , intent(in) :: str, suffix
397 logical(LK) :: endedWith
398 end function
399#endif
400
401#if SK1_ENABLED
402 pure elemental module function isEndedWith_PSSK1(str, suffix) result(endedWith)
403#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
404 !DEC$ ATTRIBUTES DLLEXPORT :: isEndedWith_PSSK1
405#endif
406 use pm_kind, only: SKG => SK1
407 type(css_pdt(SKG)) , intent(in) :: str, suffix
408 logical(LK) :: endedWith
409 end function
410#endif
411
412#endif
413!PDT_ENABLED
414
415 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
416
417 pure elemental module function isEndedWith_BSSK(str, suffix) result(endedWith)
418#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
419 !DEC$ ATTRIBUTES DLLEXPORT :: isEndedWith_BSSK
420#endif
421 use pm_kind, only: SKG => SK
422 type(css_type) , intent(in) :: str, suffix
423 logical(LK) :: endedWith
424 end function
425
426 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
427
428 end interface
429
430!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
431
493 interface getMinLoc
494
495 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
496
497#if SK5_ENABLED
498 PURE elemental module function getMinLocNoMask_SK5(str, back) result(minLoc)
499#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
500 !DEC$ ATTRIBUTES DLLEXPORT :: getMinLocNoMask_SK5
501#endif
502 use pm_kind, only: SKG => SK5
503 character(*,SKG), intent(in) :: str
504 logical(LK) , intent(in), optional :: back
505 integer(IK) :: minLoc
506 end function
507#endif
508
509#if SK4_ENABLED
510 PURE elemental module function getMinLocNoMask_SK4(str, back) result(minLoc)
511#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
512 !DEC$ ATTRIBUTES DLLEXPORT :: getMinLocNoMask_SK4
513#endif
514 use pm_kind, only: SKG => SK4
515 character(*,SKG), intent(in) :: str
516 logical(LK) , intent(in), optional :: back
517 integer(IK) :: minLoc
518 end function
519#endif
520
521#if SK3_ENABLED
522 PURE elemental module function getMinLocNoMask_SK3(str, back) result(minLoc)
523#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
524 !DEC$ ATTRIBUTES DLLEXPORT :: getMinLocNoMask_SK3
525#endif
526 use pm_kind, only: SKG => SK3
527 character(*,SKG), intent(in) :: str
528 logical(LK) , intent(in), optional :: back
529 integer(IK) :: minLoc
530 end function
531#endif
532
533#if SK2_ENABLED
534 PURE elemental module function getMinLocNoMask_SK2(str, back) result(minLoc)
535#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
536 !DEC$ ATTRIBUTES DLLEXPORT :: getMinLocNoMask_SK2
537#endif
538 use pm_kind, only: SKG => SK2
539 character(*,SKG), intent(in) :: str
540 logical(LK) , intent(in), optional :: back
541 integer(IK) :: minLoc
542 end function
543#endif
544
545#if SK1_ENABLED
546 PURE elemental module function getMinLocNoMask_SK1(str, back) result(minLoc)
547#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
548 !DEC$ ATTRIBUTES DLLEXPORT :: getMinLocNoMask_SK1
549#endif
550 use pm_kind, only: SKG => SK1
551 character(*,SKG), intent(in) :: str
552 logical(LK) , intent(in), optional :: back
553 integer(IK) :: minLoc
554 end function
555#endif
556
557 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
558
559#if SK5_ENABLED
560 PURE module function getMinLocMasked_SK5(str, mask, back) result(minLoc)
561#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
562 !DEC$ ATTRIBUTES DLLEXPORT :: getMinLocMasked_SK5
563#endif
564 use pm_kind, only: SKG => SK5
565 character(*,SKG), intent(in) :: str
566 logical(LK) , intent(in), contiguous :: mask(:)
567 logical(LK) , intent(in), optional :: back
568 integer(IK) :: minLoc
569 end function
570#endif
571
572#if SK4_ENABLED
573 PURE module function getMinLocMasked_SK4(str, mask, back) result(minLoc)
574#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
575 !DEC$ ATTRIBUTES DLLEXPORT :: getMinLocMasked_SK4
576#endif
577 use pm_kind, only: SKG => SK4
578 character(*,SKG), intent(in) :: str
579 logical(LK) , intent(in), contiguous :: mask(:)
580 logical(LK) , intent(in), optional :: back
581 integer(IK) :: minLoc
582 end function
583#endif
584
585#if SK3_ENABLED
586 PURE module function getMinLocMasked_SK3(str, mask, back) result(minLoc)
587#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
588 !DEC$ ATTRIBUTES DLLEXPORT :: getMinLocMasked_SK3
589#endif
590 use pm_kind, only: SKG => SK3
591 character(*,SKG), intent(in) :: str
592 logical(LK) , intent(in), contiguous :: mask(:)
593 logical(LK) , intent(in), optional :: back
594 integer(IK) :: minLoc
595 end function
596#endif
597
598#if SK2_ENABLED
599 PURE module function getMinLocMasked_SK2(str, mask, back) result(minLoc)
600#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
601 !DEC$ ATTRIBUTES DLLEXPORT :: getMinLocMasked_SK2
602#endif
603 use pm_kind, only: SKG => SK2
604 character(*,SKG), intent(in) :: str
605 logical(LK) , intent(in), contiguous :: mask(:)
606 logical(LK) , intent(in), optional :: back
607 integer(IK) :: minLoc
608 end function
609#endif
610
611#if SK1_ENABLED
612 PURE module function getMinLocMasked_SK1(str, mask, back) result(minLoc)
613#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
614 !DEC$ ATTRIBUTES DLLEXPORT :: getMinLocMasked_SK1
615#endif
616 use pm_kind, only: SKG => SK1
617 character(*,SKG), intent(in) :: str
618 logical(LK) , intent(in), contiguous :: mask(:)
619 logical(LK) , intent(in), optional :: back
620 integer(IK) :: minLoc
621 end function
622#endif
623
624 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
625
626 end interface
627
628!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
629
691 interface getMaxLoc
692
693 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
694
695#if SK5_ENABLED
696 PURE elemental module function getMaxLocNoMask_SK5(str, back) result(maxLoc)
697#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
698 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxLocNoMask_SK5
699#endif
700 use pm_kind, only: SKG => SK5
701 character(*,SKG), intent(in) :: str
702 logical(LK) , intent(in), optional :: back
703 integer(IK) :: maxLoc
704 end function
705#endif
706
707#if SK4_ENABLED
708 PURE elemental module function getMaxLocNoMask_SK4(str, back) result(maxLoc)
709#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
710 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxLocNoMask_SK4
711#endif
712 use pm_kind, only: SKG => SK4
713 character(*,SKG), intent(in) :: str
714 logical(LK) , intent(in), optional :: back
715 integer(IK) :: maxLoc
716 end function
717#endif
718
719#if SK3_ENABLED
720 PURE elemental module function getMaxLocNoMask_SK3(str, back) result(maxLoc)
721#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
722 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxLocNoMask_SK3
723#endif
724 use pm_kind, only: SKG => SK3
725 character(*,SKG), intent(in) :: str
726 logical(LK) , intent(in), optional :: back
727 integer(IK) :: maxLoc
728 end function
729#endif
730
731#if SK2_ENABLED
732 PURE elemental module function getMaxLocNoMask_SK2(str, back) result(maxLoc)
733#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
734 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxLocNoMask_SK2
735#endif
736 use pm_kind, only: SKG => SK2
737 character(*,SKG), intent(in) :: str
738 logical(LK) , intent(in), optional :: back
739 integer(IK) :: maxLoc
740 end function
741#endif
742
743#if SK1_ENABLED
744 PURE elemental module function getMaxLocNoMask_SK1(str, back) result(maxLoc)
745#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
746 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxLocNoMask_SK1
747#endif
748 use pm_kind, only: SKG => SK1
749 character(*,SKG), intent(in) :: str
750 logical(LK) , intent(in), optional :: back
751 integer(IK) :: maxLoc
752 end function
753#endif
754
755 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
756
757#if SK5_ENABLED
758 PURE module function getMaxLocMasked_SK5(str, mask, back) result(maxLoc)
759#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
760 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxLocMasked_SK5
761#endif
762 use pm_kind, only: SKG => SK5
763 character(*,SKG), intent(in) :: str
764 logical(LK) , intent(in), contiguous :: mask(:)
765 logical(LK) , intent(in), optional :: back
766 integer(IK) :: maxLoc
767 end function
768#endif
769
770#if SK4_ENABLED
771 PURE module function getMaxLocMasked_SK4(str, mask, back) result(maxLoc)
772#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
773 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxLocMasked_SK4
774#endif
775 use pm_kind, only: SKG => SK4
776 character(*,SKG), intent(in) :: str
777 logical(LK) , intent(in), contiguous :: mask(:)
778 logical(LK) , intent(in), optional :: back
779 integer(IK) :: maxLoc
780 end function
781#endif
782
783#if SK3_ENABLED
784 PURE module function getMaxLocMasked_SK3(str, mask, back) result(maxLoc)
785#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
786 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxLocMasked_SK3
787#endif
788 use pm_kind, only: SKG => SK3
789 character(*,SKG), intent(in) :: str
790 logical(LK) , intent(in), contiguous :: mask(:)
791 logical(LK) , intent(in), optional :: back
792 integer(IK) :: maxLoc
793 end function
794#endif
795
796#if SK2_ENABLED
797 PURE module function getMaxLocMasked_SK2(str, mask, back) result(maxLoc)
798#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
799 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxLocMasked_SK2
800#endif
801 use pm_kind, only: SKG => SK2
802 character(*,SKG), intent(in) :: str
803 logical(LK) , intent(in), contiguous :: mask(:)
804 logical(LK) , intent(in), optional :: back
805 integer(IK) :: maxLoc
806 end function
807#endif
808
809#if SK1_ENABLED
810 PURE module function getMaxLocMasked_SK1(str, mask, back) result(maxLoc)
811#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
812 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxLocMasked_SK1
813#endif
814 use pm_kind, only: SKG => SK1
815 character(*,SKG), intent(in) :: str
816 logical(LK) , intent(in), contiguous :: mask(:)
817 logical(LK) , intent(in), optional :: back
818 integer(IK) :: maxLoc
819 end function
820#endif
821
822 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
823
824 end interface
825
826!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
827
889 interface getMinVal
890
891 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
892
893#if SK5_ENABLED
894 PURE elemental module function getMinValNoMask_SK5(str) result(minVal)
895#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
896 !DEC$ ATTRIBUTES DLLEXPORT :: getMinValNoMask_SK5
897#endif
898 use pm_kind, only: SKG => SK5
899 character(*,SKG), intent(in) :: str
900 character(1,SKG) :: minVal
901 end function
902#endif
903
904#if SK4_ENABLED
905 PURE elemental module function getMinValNoMask_SK4(str) result(minVal)
906#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
907 !DEC$ ATTRIBUTES DLLEXPORT :: getMinValNoMask_SK4
908#endif
909 use pm_kind, only: SKG => SK4
910 character(*,SKG), intent(in) :: str
911 character(1,SKG) :: minVal
912 end function
913#endif
914
915#if SK3_ENABLED
916 PURE elemental module function getMinValNoMask_SK3(str) result(minVal)
917#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
918 !DEC$ ATTRIBUTES DLLEXPORT :: getMinValNoMask_SK3
919#endif
920 use pm_kind, only: SKG => SK3
921 character(*,SKG), intent(in) :: str
922 character(1,SKG) :: minVal
923 end function
924#endif
925
926#if SK2_ENABLED
927 PURE elemental module function getMinValNoMask_SK2(str) result(minVal)
928#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
929 !DEC$ ATTRIBUTES DLLEXPORT :: getMinValNoMask_SK2
930#endif
931 use pm_kind, only: SKG => SK2
932 character(*,SKG), intent(in) :: str
933 character(1,SKG) :: minVal
934 end function
935#endif
936
937#if SK1_ENABLED
938 PURE elemental module function getMinValNoMask_SK1(str) result(minVal)
939#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
940 !DEC$ ATTRIBUTES DLLEXPORT :: getMinValNoMask_SK1
941#endif
942 use pm_kind, only: SKG => SK1
943 character(*,SKG), intent(in) :: str
944 character(1,SKG) :: minVal
945 end function
946#endif
947
948 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
949
950#if SK5_ENABLED
951 PURE module function getMinValMasked_SK5(str, mask) result(minVal)
952#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
953 !DEC$ ATTRIBUTES DLLEXPORT :: getMinValMasked_SK5
954#endif
955 use pm_kind, only: SKG => SK5
956 character(*,SKG), intent(in) :: str
957 logical(LK) , intent(in), contiguous :: mask(:)
958 character(1,SKG) :: minVal
959 end function
960#endif
961
962#if SK4_ENABLED
963 PURE module function getMinValMasked_SK4(str, mask) result(minVal)
964#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
965 !DEC$ ATTRIBUTES DLLEXPORT :: getMinValMasked_SK4
966#endif
967 use pm_kind, only: SKG => SK4
968 character(*,SKG), intent(in) :: str
969 logical(LK) , intent(in), contiguous :: mask(:)
970 character(1,SKG) :: minVal
971 end function
972#endif
973
974#if SK3_ENABLED
975 PURE module function getMinValMasked_SK3(str, mask) result(minVal)
976#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
977 !DEC$ ATTRIBUTES DLLEXPORT :: getMinValMasked_SK3
978#endif
979 use pm_kind, only: SKG => SK3
980 character(*,SKG), intent(in) :: str
981 logical(LK) , intent(in), contiguous :: mask(:)
982 character(1,SKG) :: minVal
983 end function
984#endif
985
986#if SK2_ENABLED
987 PURE module function getMinValMasked_SK2(str, mask) result(minVal)
988#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
989 !DEC$ ATTRIBUTES DLLEXPORT :: getMinValMasked_SK2
990#endif
991 use pm_kind, only: SKG => SK2
992 character(*,SKG), intent(in) :: str
993 logical(LK) , intent(in), contiguous :: mask(:)
994 character(1,SKG) :: minVal
995 end function
996#endif
997
998#if SK1_ENABLED
999 PURE module function getMinValMasked_SK1(str, mask) result(minVal)
1000#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1001 !DEC$ ATTRIBUTES DLLEXPORT :: getMinValMasked_SK1
1002#endif
1003 use pm_kind, only: SKG => SK1
1004 character(*,SKG), intent(in) :: str
1005 logical(LK) , intent(in), contiguous :: mask(:)
1006 character(1,SKG) :: minVal
1007 end function
1008#endif
1009
1010 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1011
1012 end interface
1013
1014!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1015
1077 interface getMaxVal
1078
1079 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1080
1081#if SK5_ENABLED
1082 PURE elemental module function getMaxValNoMask_SK5(str) result(maxVal)
1083#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1084 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxValNoMask_SK5
1085#endif
1086 use pm_kind, only: SKG => SK5
1087 character(*,SKG), intent(in) :: str
1088 character(1,SKG) :: maxVal
1089 end function
1090#endif
1091
1092#if SK4_ENABLED
1093 PURE elemental module function getMaxValNoMask_SK4(str) result(maxVal)
1094#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1095 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxValNoMask_SK4
1096#endif
1097 use pm_kind, only: SKG => SK4
1098 character(*,SKG), intent(in) :: str
1099 character(1,SKG) :: maxVal
1100 end function
1101#endif
1102
1103#if SK3_ENABLED
1104 PURE elemental module function getMaxValNoMask_SK3(str) result(maxVal)
1105#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1106 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxValNoMask_SK3
1107#endif
1108 use pm_kind, only: SKG => SK3
1109 character(*,SKG), intent(in) :: str
1110 character(1,SKG) :: maxVal
1111 end function
1112#endif
1113
1114#if SK2_ENABLED
1115 PURE elemental module function getMaxValNoMask_SK2(str) result(maxVal)
1116#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1117 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxValNoMask_SK2
1118#endif
1119 use pm_kind, only: SKG => SK2
1120 character(*,SKG), intent(in) :: str
1121 character(1,SKG) :: maxVal
1122 end function
1123#endif
1124
1125#if SK1_ENABLED
1126 PURE elemental module function getMaxValNoMask_SK1(str) result(maxVal)
1127#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1128 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxValNoMask_SK1
1129#endif
1130 use pm_kind, only: SKG => SK1
1131 character(*,SKG), intent(in) :: str
1132 character(1,SKG) :: maxVal
1133 end function
1134#endif
1135
1136 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1137
1138#if SK5_ENABLED
1139 PURE module function getMaxValMasked_SK5(str, mask) result(maxVal)
1140#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1141 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxValMasked_SK5
1142#endif
1143 use pm_kind, only: SKG => SK5
1144 character(*,SKG), intent(in) :: str
1145 logical(LK) , intent(in), contiguous :: mask(:)
1146 character(1,SKG) :: maxVal
1147 end function
1148#endif
1149
1150#if SK4_ENABLED
1151 PURE module function getMaxValMasked_SK4(str, mask) result(maxVal)
1152#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1153 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxValMasked_SK4
1154#endif
1155 use pm_kind, only: SKG => SK4
1156 character(*,SKG), intent(in) :: str
1157 logical(LK) , intent(in), contiguous :: mask(:)
1158 character(1,SKG) :: maxVal
1159 end function
1160#endif
1161
1162#if SK3_ENABLED
1163 PURE module function getMaxValMasked_SK3(str, mask) result(maxVal)
1164#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1165 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxValMasked_SK3
1166#endif
1167 use pm_kind, only: SKG => SK3
1168 character(*,SKG), intent(in) :: str
1169 logical(LK) , intent(in), contiguous :: mask(:)
1170 character(1,SKG) :: maxVal
1171 end function
1172#endif
1173
1174#if SK2_ENABLED
1175 PURE module function getMaxValMasked_SK2(str, mask) result(maxVal)
1176#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1177 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxValMasked_SK2
1178#endif
1179 use pm_kind, only: SKG => SK2
1180 character(*,SKG), intent(in) :: str
1181 logical(LK) , intent(in), contiguous :: mask(:)
1182 character(1,SKG) :: maxVal
1183 end function
1184#endif
1185
1186#if SK1_ENABLED
1187 PURE module function getMaxValMasked_SK1(str, mask) result(maxVal)
1188#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1189 !DEC$ ATTRIBUTES DLLEXPORT :: getMaxValMasked_SK1
1190#endif
1191 use pm_kind, only: SKG => SK1
1192 character(*,SKG), intent(in) :: str
1193 logical(LK) , intent(in), contiguous :: mask(:)
1194 character(1,SKG) :: maxVal
1195 end function
1196#endif
1197
1198 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1199
1200 end interface
1201
1202!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1203
1242 interface getCharVec
1243
1244 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1245
1246#if SK5_ENABLED
1247 pure module function getCharVec_SK5(str) result(charVec)
1248#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1249 !DEC$ ATTRIBUTES DLLEXPORT :: getCharVec_SK5
1250#endif
1251 use pm_kind, only: SKG => SK5
1252 character(*,SKG), intent(in) :: str
1253 character(1,SKG) :: charVec(len(str, IK))
1254 end function
1255#endif
1256
1257#if SK4_ENABLED
1258 pure module function getCharVec_SK4(str) result(charVec)
1259#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1260 !DEC$ ATTRIBUTES DLLEXPORT :: getCharVec_SK4
1261#endif
1262 use pm_kind, only: SKG => SK4
1263 character(*,SKG), intent(in) :: str
1264 character(1,SKG) :: charVec(len(str, IK))
1265 end function
1266#endif
1267
1268#if SK3_ENABLED
1269 pure module function getCharVec_SK3(str) result(charVec)
1270#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1271 !DEC$ ATTRIBUTES DLLEXPORT :: getCharVec_SK3
1272#endif
1273 use pm_kind, only: SKG => SK3
1274 character(*,SKG), intent(in) :: str
1275 character(1,SKG) :: charVec(len(str, IK))
1276 end function
1277#endif
1278
1279#if SK2_ENABLED
1280 pure module function getCharVec_SK2(str) result(charVec)
1281#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1282 !DEC$ ATTRIBUTES DLLEXPORT :: getCharVec_SK2
1283#endif
1284 use pm_kind, only: SKG => SK2
1285 character(*,SKG), intent(in) :: str
1286 character(1,SKG) :: charVec(len(str, IK))
1287 end function
1288#endif
1289
1290#if SK1_ENABLED
1291 pure module function getCharVec_SK1(str) result(charVec)
1292#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1293 !DEC$ ATTRIBUTES DLLEXPORT :: getCharVec_SK1
1294#endif
1295 use pm_kind, only: SKG => SK1
1296 character(*,SKG), intent(in) :: str
1297 character(1,SKG) :: charVec(len(str, IK))
1298 end function
1299#endif
1300
1301 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1302
1303 end interface
1304
1305!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1306
1347 interface getCharSeq
1348
1349 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1350
1351#if SK5_ENABLED
1352 pure module function getCharSeq_SK5(charVec) result(str)
1353#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1354 !DEC$ ATTRIBUTES DLLEXPORT :: getCharSeq_SK5
1355#endif
1356 use pm_kind, only: SKG => SK5
1357 character(1,SKG), intent(in), contiguous :: charVec(:)
1358 character(size(charVec,1,IK),SKG) :: str
1359 end function
1360#endif
1361
1362#if SK4_ENABLED
1363 pure module function getCharSeq_SK4(charVec) result(str)
1364#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1365 !DEC$ ATTRIBUTES DLLEXPORT :: getCharSeq_SK4
1366#endif
1367 use pm_kind, only: SKG => SK4
1368 character(1,SKG), intent(in), contiguous :: charVec(:)
1369 character(size(charVec,1,IK),SKG) :: str
1370 end function
1371#endif
1372
1373#if SK3_ENABLED
1374 pure module function getCharSeq_SK3(charVec) result(str)
1375#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1376 !DEC$ ATTRIBUTES DLLEXPORT :: getCharSeq_SK3
1377#endif
1378 use pm_kind, only: SKG => SK3
1379 character(1,SKG), intent(in), contiguous :: charVec(:)
1380 character(size(charVec,1,IK),SKG) :: str
1381 end function
1382#endif
1383
1384#if SK2_ENABLED
1385 pure module function getCharSeq_SK2(charVec) result(str)
1386#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1387 !DEC$ ATTRIBUTES DLLEXPORT :: getCharSeq_SK2
1388#endif
1389 use pm_kind, only: SKG => SK2
1390 character(1,SKG), intent(in), contiguous :: charVec(:)
1391 character(size(charVec,1,IK),SKG) :: str
1392 end function
1393#endif
1394
1395#if SK1_ENABLED
1396 pure module function getCharSeq_SK1(charVec) result(str)
1397#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1398 !DEC$ ATTRIBUTES DLLEXPORT :: getCharSeq_SK1
1399#endif
1400 use pm_kind, only: SKG => SK1
1401 character(1,SKG), intent(in), contiguous :: charVec(:)
1402 character(size(charVec,1,IK),SKG) :: str
1403 end function
1404#endif
1405
1406 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1407
1408 end interface
1409
1410!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1411
1450
1451 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1452
1453#if SK5_ENABLED
1454 pure module function getTrimmedTZ_SK5(str) result(strt)
1455#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1456 !DEC$ ATTRIBUTES DLLEXPORT :: getTrimmedTZ_SK5
1457#endif
1458 use pm_kind, only: SKG => SK5
1459 character(*,SKG), intent(in) :: str
1460 character(:,SKG) , allocatable :: strt
1461 end function
1462#endif
1463
1464#if SK4_ENABLED
1465 pure module function getTrimmedTZ_SK4(str) result(strt)
1466#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1467 !DEC$ ATTRIBUTES DLLEXPORT :: getTrimmedTZ_SK4
1468#endif
1469 use pm_kind, only: SKG => SK4
1470 character(*,SKG), intent(in) :: str
1471 character(:,SKG) , allocatable :: strt
1472 end function
1473#endif
1474
1475#if SK3_ENABLED
1476 pure module function getTrimmedTZ_SK3(str) result(strt)
1477#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1478 !DEC$ ATTRIBUTES DLLEXPORT :: getTrimmedTZ_SK3
1479#endif
1480 use pm_kind, only: SKG => SK3
1481 character(*,SKG), intent(in) :: str
1482 character(:,SKG) , allocatable :: strt
1483 end function
1484#endif
1485
1486#if SK2_ENABLED
1487 pure module function getTrimmedTZ_SK2(str) result(strt)
1488#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1489 !DEC$ ATTRIBUTES DLLEXPORT :: getTrimmedTZ_SK2
1490#endif
1491 use pm_kind, only: SKG => SK2
1492 character(*,SKG), intent(in) :: str
1493 character(:,SKG) , allocatable :: strt
1494 end function
1495#endif
1496
1497#if SK1_ENABLED
1498 pure module function getTrimmedTZ_SK1(str) result(strt)
1499#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1500 !DEC$ ATTRIBUTES DLLEXPORT :: getTrimmedTZ_SK1
1501#endif
1502 use pm_kind, only: SKG => SK1
1503 character(*,SKG), intent(in) :: str
1504 character(:,SKG) , allocatable :: strt
1505 end function
1506#endif
1507
1508 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1509
1510 end interface
1511
1512!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1513
1618
1619 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1620
1621#if SK5_ENABLED
1622 impure module function getStrWrapped_SK5(str, prefix, indent, break, newline, linefeed, width, maxwidth) result(strWrapped)
1623#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1624 !DEC$ ATTRIBUTES DLLEXPORT :: getStrWrapped_SK5
1625#endif
1626 use pm_kind, only: SKG => SK5
1627 character(*,SKG) , intent(in) :: str
1628 character(*,SKG) , intent(in) , optional :: prefix, indent, break, newline, linefeed
1629 integer(IK) , intent(in) , optional :: width, maxwidth
1630 character(:,SKG) , allocatable :: strWrapped
1631 end function
1632#endif
1633
1634#if SK4_ENABLED
1635 impure module function getStrWrapped_SK4(str, prefix, indent, break, newline, linefeed, width, maxwidth) result(strWrapped)
1636#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1637 !DEC$ ATTRIBUTES DLLEXPORT :: getStrWrapped_SK4
1638#endif
1639 use pm_kind, only: SKG => SK4
1640 character(*,SKG) , intent(in) :: str
1641 character(*,SKG) , intent(in) , optional :: prefix, indent, break, newline, linefeed
1642 integer(IK) , intent(in) , optional :: width, maxwidth
1643 character(:,SKG) , allocatable :: strWrapped
1644 end function
1645#endif
1646
1647#if SK3_ENABLED
1648 impure module function getStrWrapped_SK3(str, prefix, indent, break, newline, linefeed, width, maxwidth) result(strWrapped)
1649#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1650 !DEC$ ATTRIBUTES DLLEXPORT :: getStrWrapped_SK3
1651#endif
1652 use pm_kind, only: SKG => SK3
1653 character(*,SKG) , intent(in) :: str
1654 character(*,SKG) , intent(in) , optional :: prefix, indent, break, newline, linefeed
1655 integer(IK) , intent(in) , optional :: width, maxwidth
1656 character(:,SKG) , allocatable :: strWrapped
1657 end function
1658#endif
1659
1660#if SK2_ENABLED
1661 impure module function getStrWrapped_SK2(str, prefix, indent, break, newline, linefeed, width, maxwidth) result(strWrapped)
1662#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1663 !DEC$ ATTRIBUTES DLLEXPORT :: getStrWrapped_SK2
1664#endif
1665 use pm_kind, only: SKG => SK2
1666 character(*,SKG) , intent(in) :: str
1667 character(*,SKG) , intent(in) , optional :: prefix, indent, break, newline, linefeed
1668 integer(IK) , intent(in) , optional :: width, maxwidth
1669 character(:,SKG) , allocatable :: strWrapped
1670 end function
1671#endif
1672
1673#if SK1_ENABLED
1674 impure module function getStrWrapped_SK1(str, prefix, indent, break, newline, linefeed, width, maxwidth) result(strWrapped)
1675#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1676 !DEC$ ATTRIBUTES DLLEXPORT :: getStrWrapped_SK1
1677#endif
1678 use pm_kind, only: SKG => SK1
1679 character(*,SKG) , intent(in) :: str
1680 character(*,SKG) , intent(in) , optional :: prefix, indent, break, newline, linefeed
1681 integer(IK) , intent(in) , optional :: width, maxwidth
1682 character(:,SKG) , allocatable :: strWrapped
1683 end function
1684#endif
1685
1686 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1687
1688 end interface
1689
1690!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1691
1747
1748 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1749
1750#if SK5_ENABLED
1751 pure elemental module function getLenIndent_SK5(str, pattern) result(lenIndent)
1752#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1753 !DEC$ ATTRIBUTES DLLEXPORT :: getLenIndent_SK5
1754#endif
1755 use pm_kind, only: SKG => SK5
1756 character(*,SKG) , intent(in) :: str, pattern
1757 integer(IK) :: lenIndent
1758 end function
1759#endif
1760
1761#if SK4_ENABLED
1762 pure elemental module function getLenIndent_SK4(str, pattern) result(lenIndent)
1763#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1764 !DEC$ ATTRIBUTES DLLEXPORT :: getLenIndent_SK4
1765#endif
1766 use pm_kind, only: SKG => SK4
1767 character(*,SKG) , intent(in) :: str, pattern
1768 integer(IK) :: lenIndent
1769 end function
1770#endif
1771
1772#if SK3_ENABLED
1773 pure elemental module function getLenIndent_SK3(str, pattern) result(lenIndent)
1774#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1775 !DEC$ ATTRIBUTES DLLEXPORT :: getLenIndent_SK3
1776#endif
1777 use pm_kind, only: SKG => SK3
1778 character(*,SKG) , intent(in) :: str, pattern
1779 integer(IK) :: lenIndent
1780 end function
1781#endif
1782
1783#if SK2_ENABLED
1784 pure elemental module function getLenIndent_SK2(str, pattern) result(lenIndent)
1785#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1786 !DEC$ ATTRIBUTES DLLEXPORT :: getLenIndent_SK2
1787#endif
1788 use pm_kind, only: SKG => SK2
1789 character(*,SKG) , intent(in) :: str, pattern
1790 integer(IK) :: lenIndent
1791 end function
1792#endif
1793
1794#if SK1_ENABLED
1795 pure elemental module function getLenIndent_SK1(str, pattern) result(lenIndent)
1796#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1797 !DEC$ ATTRIBUTES DLLEXPORT :: getLenIndent_SK1
1798#endif
1799 use pm_kind, only: SKG => SK1
1800 character(*,SKG) , intent(in) :: str, pattern
1801 integer(IK) :: lenIndent
1802 end function
1803#endif
1804
1805 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1806
1807 end interface
1808
1809!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1810
1811! > \brief
1812! > Wrap the input scalar string to within the specified width while
1813! > optionally respecting the initial indentation in all subsequent lines.<br>
1814! >
1815! > \param[in] str : The input scalar of type `character` of kind \SKALL that is to be wrapped.<br>
1816! > \param[in] prefix : The input scalar of the same type and kind as the input `str` of arbitrary length type parameter,
1817! > whose contents will be prefixed to each new line (including the first line) before an indentation occurs.<br>
1818! > Note that `prefix` does **not** count toward filling the specified `width` or `maxwidth` of each wrapped line.<br>
1819! > (**optional**, default = `SKG_""`)
1820! > \param[in] indent : The input scalar of the same type and kind as the input `str` of arbitrary length type parameter,
1821! > whose contents are the set of characters to search for at the beginning of the input `str` representing the indentation.<br>
1822! > If specified as a non-empty input argument, then all wrappings of `str` will be indented with as many instances of `indent`
1823! > that are found at the beginning of the input `str`.<br>
1824! > For example, the following choice of input arguments,
1825! > \code{.F90}
1826! > List = getStrWrappedList(str = "~+~+This is a test.", indent = "~+")
1827! > \endcode
1828! > will lead to prefixing each wrapped line in the output `List` with `~+~+`.<br>
1829! > (**optional**, default = `" "`. If `indent = ""`, then no indentation of the lines will occur.)
1830! > \param[in] break : The input scalar of the same type and kind as the input `str` of arbitrary length type parameter,
1831! > whose contents are the set of characters at which breaking the input `str` is allowed.<br>
1832! > Setting `break = ""` will lead to wrapping the input `str` at any arbitrary character
1833! > as soon as the length of a given line reaches the specified `width`.<br>
1834! > (**optional**, default = " ")
1835! > \param[in] newline : The input scalar of the same type and kind as the input `str` of arbitrary length type parameter.<br>
1836! > Upon encountering a pattern that matches `newline`, the pattern will be removed and a new line will be created
1837! > starting with `prefix//indent` followed by the rest of the `str` that appears immediately after `newline`.<br>
1838! > (**optional**, default = `new_line(SKG_" ")`)
1839! > \param[in] width : The input scalar of type `integer` of default kind \IK, representing the length of each line in the
1840! > output wrapping, **with the possibility of word overflows**.<br>
1841! !> If a word overflows the specified input line width,
1842! > it is allowed to continue in the same line until the next `break` character is encountered.<br>
1843! > (**optional**, default = `132_IK`)
1844! > \param[in] maxwidth : The input scalar of type `integer` of default kind \IK,
1845! > representing the maximum length of each line in `List`, beyond which no character can appear in any line.<br>
1846! > If a word overflows the specified input `maxwidth` line limit, it will be broken and continued on the next line.<br>
1847! > If `break = ""`, then the value of `maxwidth` becomes irrelevant because line wrapping will strictly occur at `width`.<br>
1848! > (**optional**, default = `huge(0_IK) / 2_IK`)
1849! >
1850! > \return
1851! > `List` : The output `allocatable` array rank `1` of type string-container [css_pdt](@ pm_container::css_pdt)
1852! > whose string contents are of the same kind as the kind of the input `str`, each element of which
1853! > contains a segment of the input `str` wrapped within the specified width.<br>
1854! >
1855! > \interface{getStrWrappedList}
1856! > \code{.F90}
1857! >
1858! > use pm_str, only: getStrWrappedList
1859! > use pm_container, only: css_pdt
1860! >
1861! > type(css_pdt(kind(str))). allocatable :: List(:)
1862! >
1863! > List = getStrWrappedList(str)
1864! >
1865! > \endcode
1866! >
1867! > \warning
1868! > An input `str` satisfying `len(str,IK) >= maxwidth` can potentially cause arithmetic overflow in this algorithm.<br>
1869! > When \IK refers to the 32-bit `integer` kind, this issue becomes relevant only for strings longer than \f$1^9\f$ characters.<br>
1870! >
1871! > \warning
1872! > The condition `len(indent) < width <= maxwidth` must hold at all times.<br>
1873! > \vericons
1874! >
1875! > \warnpure
1876! >
1877! > \remark
1878! > This procedure exists primarily to facilitate implementation of other procedures in other modules of the library, e.g., [pm_err](@ref pm_err).<br>
1879! > Other algorithms in this library listed below can provide more general solutions to the problem solved by this procedure.<br>
1880! >
1881! > \see
1882! > [getLocNonSpace](@ref pm_str::getLocNonSpace)<br>
1883! > [setLoc](@ref pm_arrayFind::setLoc)<br>
1884! > [getLoc](@ref pm_arrayFind::getLoc)<br>
1885! > [getBin](@ref pm_arraySearch::getBin)<br>
1886! >
1887! > \example{getStrWrappedList}
1888! > \include{lineno} example/pm_str/getStrWrappedList/main.F90
1889! > \compile{getStrWrappedList}
1890! > \output{getStrWrappedList}
1891! > \include{lineno} example/pm_str/getStrWrappedList/main.out.F90
1892! >
1893! > \test
1894! > [test_pm_str](@ref test_pm_str)
1895! >
1896! > \final
1897! >
1898! > \author
1899! > Amir Shahmoradi, Tuesday March 7, 2017, 3:50 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin
1900! interface getStrWrappedList
1901!
1902! !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1903!
1904!#if SK5_ENABLED
1905! impure module function getStrWrappedList_SK5(str, prefix, indent, break, newline, width, maxwidth) result(List)
1906!#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1907! !DEC$ ATTRIBUTES DLLEXPORT :: getStrWrappedList_SK5
1908!#endif
1909! use pm_kind, only: SKG => SK5
1910! character(*,SKG) , intent(in) :: str
1911! character(*,SKG) , intent(in) , optional :: prefix, indent, break, newline
1912! integer(IK) , intent(in) , optional :: width, maxwidth
1913! type(css_pdt(SKG)) , allocatable :: List(:)
1914! end function
1915!#endif
1916!
1917!#if SK4_ENABLED
1918! impure module function getStrWrappedList_SK4(str, prefix, indent, break, newline, width, maxwidth) result(List)
1919!#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1920! !DEC$ ATTRIBUTES DLLEXPORT :: getStrWrappedList_SK4
1921!#endif
1922! use pm_kind, only: SKG => SK4
1923! character(*,SKG) , intent(in) :: str
1924! character(*,SKG) , intent(in) , optional :: prefix, indent, break, newline
1925! integer(IK) , intent(in) , optional :: width, maxwidth
1926! type(css_pdt(SKG)) , allocatable :: List(:)
1927! end function
1928!#endif
1929!
1930!#if SK3_ENABLED
1931! impure module function getStrWrappedList_SK3(str, prefix, indent, break, newline, width, maxwidth) result(List)
1932!#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1933! !DEC$ ATTRIBUTES DLLEXPORT :: getStrWrappedList_SK3
1934!#endif
1935! use pm_kind, only: SKG => SK3
1936! character(*,SKG) , intent(in) :: str
1937! character(*,SKG) , intent(in) , optional :: prefix, indent, break, newline
1938! integer(IK) , intent(in) , optional :: width, maxwidth
1939! type(css_pdt(SKG)) , allocatable :: List(:)
1940! end function
1941!#endif
1942!
1943!#if SK2_ENABLED
1944! impure module function getStrWrappedList_SK2(str, prefix, indent, break, newline, width, maxwidth) result(List)
1945!#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1946! !DEC$ ATTRIBUTES DLLEXPORT :: getStrWrappedList_SK2
1947!#endif
1948! use pm_kind, only: SKG => SK2
1949! character(*,SKG) , intent(in) :: str
1950! character(*,SKG) , intent(in) , optional :: prefix, indent, break, newline
1951! integer(IK) , intent(in) , optional :: width, maxwidth
1952! type(css_pdt(SKG)) , allocatable :: List(:)
1953! end function
1954!#endif
1955!
1956!#if SK1_ENABLED
1957! impure module function getStrWrappedList_SK1(str, prefix, indent, break, newline, width, maxwidth) result(List)
1958!#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1959! !DEC$ ATTRIBUTES DLLEXPORT :: getStrWrappedList_SK1
1960!#endif
1961! use pm_kind, only: SKG => SK1
1962! character(*,SKG) , intent(in) :: str
1963! character(*,SKG) , intent(in) , optional :: prefix, indent, break, newline
1964! integer(IK) , intent(in) , optional :: width, maxwidth
1965! type(css_pdt(SKG)) , allocatable :: List(:)
1966! end function
1967!#endif
1968!
1969! !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1970!
1971! end interface
1972
1973!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1974
1975!contains
1976!
1977!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1978!
1979! !> \brief
1980! !> Generate and return a vector of single-characters each element of which corresponds to one character in the input scalar string.<br>
1981! !>
1982! !> \param[in] string : The input scalar `character` of arbitrary `len` type parameter of default kind \SK.<br>
1983! !>
1984! !> \return
1985! !> `charVec` : The output vector of the same type and kind as the input `string`, composed
1986! !> of single characters corresponding to each character in the input scalar string.<br>
1987! !>
1988! !> \interface{getCharVec}
1989! !> \code{.F90}
1990! !>
1991! !> use pm_str, only: getCharVec
1992! !> character(*, SK) :: string
1993! !> character(1, SK) :: charVec(len(string))
1994! !>
1995! !> charVec = getCharVec(string)
1996! !>
1997! !> \endcode
1998! !>
1999! !> \pure
2000! !>
2001! !> \see
2002! !> [getCharSeq](@ref pm_str::getCharSeq)<br>
2003! !>
2004! !> \example{getCharVec}
2005! !> \include{lineno} example/pm_str/getCharVec/main.F90
2006! !> \compilef
2007! !> \output
2008! !> \include{lineno} example/pm_str/getCharVec/main.out.F90
2009! !>
2010! !> \test
2011! !> [test_pm_str](@ref test_pm_str)
2012! !>
2013! !> \final
2014! !>
2015! !> \author
2016! !> \AmirShahmoradi, September 1, 2017, 12:00 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin
2017! pure function getCharVec(str) result(charVec)
2018!#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
2019! !DEC$ ATTRIBUTES DLLEXPORT :: getCharVec
2020!#endif
2021! use pm_kind, only: SK, IK
2022! character(*, SK), intent(in) :: str
2023! character(1, SK) :: charVec(len(str, kind=IK))
2024! integer(IK) :: i
2025! do concurrent(i = 1_IK : len(str, kind = IK))
2026! charVec(i) = str(i:i)
2027! end do
2028! end function
2029!
2030!!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2031!
2032! !> \brief
2033! !> Generate and return a scalar string resulting from the concatenation of
2034! !> the individual elements (single-characters) of the input vector of characters.<br>
2035! !>
2036! !> \param[in] charVec : The input `contiguous` vector of rank `1` of type `character` of default kind \SK
2037! !> of `len` type parameter `1`, each element of which contains a single character.<br>
2038! !>
2039! !> \return
2040! !> `string` : The output string scalar of the same kind as `charVec` whose content
2041! !> is the concatenation of the single characters in the input `charVec`.<br>
2042! !>
2043! !> \interface{getCharSeq}
2044! !> \code{.F90}
2045! !>
2046! !> use pm_str, only: getCharSeq
2047! !> character(1, SK) :: charVec(*)
2048! !> character(size(charVec), SK) :: string
2049! !>
2050! !> string = getCharSeq(charVec)
2051! !>
2052! !> \endcode
2053! !>
2054! !> \pure
2055! !>
2056! !> \see
2057! !> [getCharVec](@ref pm_str::getCharVec)<br>
2058! !>
2059! !> \example{getCharSeq}
2060! !> \include{lineno} example/pm_str/getCharSeq/main.F90
2061! !> \compilef
2062! !> \output
2063! !> \include{lineno} example/pm_str/getCharSeq/main.out.F90
2064! !>
2065! !> \test
2066! !> [test_pm_str](@ref test_pm_str)
2067! !>
2068! !> \final
2069! !>
2070! !> \author
2071! !> \AmirShahmoradi, September 1, 2017, 12:00 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin
2072! pure function getCharSeq(charVec) result(string)
2073!#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
2074! !DEC$ ATTRIBUTES DLLEXPORT :: getCharSeq
2075!#endif
2076! use pm_kind, only: SK, IK
2077! character(1, SK), intent(in), contiguous :: charVec(:)
2078! character(size(charVec, kind = IK), SK) :: string
2079! integer(IK) :: i
2080! do concurrent(i = 1_IK : size(charVec, kind = IK))
2081! string(i:i) = charVec(i)
2082! end do
2083! end function
2084!
2085!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2086!
2087! !> \brief
2088! !> Pad the input assumed-size character vector `str` with the input assumed-size
2089! !> character vector `fill` for a length of `lenPadded` and return the resulting new string.<br>
2090! !>
2091! !> \param[in] str : The input assumed-size character vector to be padded.<br>
2092! !> \param[in] fill : The input assumed-size character vector to be used as the fill for padding.<br>
2093! !> \param[in] lenPadded : The length of the resulting final allocatable character vector.<br>
2094! !>
2095! !> \return
2096! !> `strPadded` : The output string padded with `fill`.<br>
2097! !>
2098! !> \remark
2099! !> Note that `fill` is an assumed-size character vector of any length. However, if the full length of fill does
2100! !> not fit at the end of the padded output `strPadded`, the `fill` will be cut at the end of the output `strPadded`.<br>
2101! pure function getPadded(str, fill, lenPadded) result(strPadded)
2102!#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
2103! !DEC$ ATTRIBUTES DLLEXPORT :: getPadded
2104!#endif
2105! use pm_kind, only: SK, IK
2106! implicit none
2107! character(*, SK), intent(in) :: str
2108! character(*, SK), intent(in) :: fill
2109! integer(IK) , intent(in) :: lenPadded
2110! character(lenPadded) :: strPadded
2111! character(:, SK), allocatable :: pad
2112! integer(IK) :: lenStr, lenFill, fillCount, diff ! LCOV_EXCL_LINE
2113! lenStr = len(str, kind = IK)
2114! if (lenStr >= lenPadded) then
2115! strPadded = str
2116! return
2117! end if
2118! lenFill = len(fill, kind = IK)
2119! diff = lenPadded - lenStr
2120! fillCount = diff / lenFill + 1_IK
2121! pad = repeat(fill,fillCount)
2122! strPadded = str // pad(1:diff)
2123! end function getPadded
2124!
2125!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2126
2127end module pm_str ! LCOV_EXCL_LINE
Generate and return a scalar string resulting from the concatenation of the individual elements (sing...
Definition: pm_str.F90:1347
Generate and return a vector of single-characters each element of which corresponds to one character ...
Definition: pm_str.F90:1242
Generate and return the number of non-overlapping repetitions of the input pattern in the input str u...
Definition: pm_str.F90:1746
Generate and return the location of the first occurrence of the maximum of the input string(s).
Definition: pm_str.F90:691
Generate and return maximum character value in the input string(s).
Definition: pm_str.F90:1077
Generate and return the location of the first occurrence of the minimum of the input string(s).
Definition: pm_str.F90:493
Generate and return minimum character value in the input string(s).
Definition: pm_str.F90:889
Generate and return the input scalar string wrapped within the specified width while optionally prefi...
Definition: pm_str.F90:1617
Generate and return a vector of single-characters each element of which corresponds to one character ...
Definition: pm_str.F90:1449
Generate and return the location of the first occurrence of the minimum of the input string(s).
Definition: pm_str.F90:294
This module contains the derived types for generating allocatable containers of scalar,...
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter SK5
Definition: pm_kind.F90:326
integer, parameter SK1
Definition: pm_kind.F90:346
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter SK4
Definition: pm_kind.F90:331
integer, parameter SK2
Definition: pm_kind.F90:341
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
integer, parameter SK3
Definition: pm_kind.F90:336
This module contains classes and procedures for various string manipulations and inquiries.
Definition: pm_str.F90:49
character(*, SK), parameter UNDEFINED
The scalar character parameter of default kind SK containing "UNDEFINED".
Definition: pm_str.F90:93
character(*, SK), parameter SPACE
The space character of default kind SK of length 1.
Definition: pm_str.F90:83
character(*, SK), parameter MODULE_NAME
Definition: pm_str.F90:79
character(*, SK), parameter NLC
The newline character of default kind SK as returned by new_line(SK_"a").
Definition: pm_str.F90:88
This is the css_pdt parameterized type for generating instances of container of scalar of string obje...
This is the css_type type for generating instances of container of scalar of string objects.