\hypertarget{namespacedc__string}{}\section{dc\+\_\+string Module Reference}
\label{namespacedc__string}\index{dc\+\_\+string@{dc\+\_\+string}}


\subsection{Detailed Description}
Handling character types. 

\begin{DoxyAuthor}{Author}
Youhei S\+A\+S\+A\+KI, Yasuhiro M\+O\+R\+I\+K\+A\+WA, Eizi T\+O\+Y\+O\+DA 
\end{DoxyAuthor}
\begin{DoxyCopyright}{Copyright}
Copyright (C) G\+FD Dennou Club, 2000-\/2017. All rights reserved. ~\newline
 License is B\+S\+D-\/2-\/\+Clause. see \hyperlink{COPYRIGHT}{C\+O\+P\+Y\+R\+I\+G\+HT} in detail
\end{DoxyCopyright}
This module provides subrouteins handle character type variables. \subsection*{Data Types}
\begin{DoxyCompactItemize}
\item 
interface \hyperlink{interfacedc__string_1_1concat}{concat}
\item 
interface \hyperlink{interfacedc__string_1_1cprintf}{cprintf}
\item 
interface \hyperlink{interfacedc__string_1_1get__array}{get\+\_\+array}
\item 
interface \hyperlink{interfacedc__string_1_1index__ofs}{index\+\_\+ofs}
\item 
interface \hyperlink{interfacedc__string_1_1lchar}{lchar}
\item 
interface \hyperlink{interfacedc__string_1_1printf}{printf}
\item 
interface \hyperlink{interfacedc__string_1_1putline}{putline}
\item 
interface \hyperlink{interfacedc__string_1_1replace}{replace}
\item 
interface \hyperlink{interfacedc__string_1_1roundnum}{roundnum}
\item 
interface \hyperlink{interfacedc__string_1_1split}{split}
\item 
interface \hyperlink{interfacedc__string_1_1stoa}{stoa}
\item 
interface \hyperlink{interfacedc__string_1_1stod}{stod}
\item 
interface \hyperlink{interfacedc__string_1_1stoi}{stoi}
\item 
interface \hyperlink{interfacedc__string_1_1str__to__logical}{str\+\_\+to\+\_\+logical}
\item 
interface \hyperlink{interfacedc__string_1_1strhead}{strhead}
\item 
interface \hyperlink{interfacedc__string_1_1strieq}{strieq}
\item 
interface \hyperlink{interfacedc__string_1_1strinclude}{strinclude}
\item 
interface \hyperlink{interfacedc__string_1_1tochar}{tochar}
\item 
interface \hyperlink{interfacedc__string_1_1tolower}{tolower}
\item 
interface \hyperlink{interfacedc__string_1_1toupper}{toupper}
\item 
interface \hyperlink{interfacedc__string_1_1uchar}{uchar}
\end{DoxyCompactItemize}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
logical function \hyperlink{namespacedc__string_a39f333ec46e3653c1909ea2f9f805398}{strhead\+\_\+cc} (whole, head)
\item 
logical function \hyperlink{namespacedc__string_ace046e81a387055ae01389766e76b980}{strieq\+\_\+cc} (string\+\_\+a, string\+\_\+b)
\item 
logical function \hyperlink{namespacedc__string_a3543d3d749bf4eba8a6087d958bf08bf}{str\+\_\+include\+\_\+ac} (carray, string, ignore\+\_\+space, ignore\+\_\+case)
\item 
logical function \hyperlink{namespacedc__string_a5236d631d906becd3be7610031c90d2e}{str2bool} (string)
\item 
integer function \hyperlink{namespacedc__string_a922cc3624ab8fbcffc417e8116cff96e}{atoi\+\_\+scalar} (string, default)
\item 
real(dp) function \hyperlink{namespacedc__string_a99ccb65c9cc508e03d50f4844fac9aee}{atod\+\_\+scalar} (string\+\_\+in)
\item 
subroutine \hyperlink{namespacedc__string_acbb91600d309368d60f4fa9260a20ee5}{str2ip} (int\+\_\+ptr, string\+\_\+in)
\item 
subroutine \hyperlink{namespacedc__string_ab4a16c1c3c10504c85befeb3afa33cfa}{str2rp} (real\+\_\+ptr, string\+\_\+in)
\item 
subroutine \hyperlink{namespacedc__string_a571b6f3c04e2126c4da069aa0a65d90a}{str2dp} (real\+\_\+ptr, string\+\_\+in)
\item 
character(token) function \hyperlink{namespacedc__string_af817740976530623403aa9f474d06a5c}{itoa\+\_\+scalar} (i)
\item 
character(string) function \hyperlink{namespacedc__string_a06930bb729b4054b11cd037394f488be}{itoa\+\_\+array} (ibuf)
\item 
character(token) function \hyperlink{namespacedc__string_ae1342d689ceda89ab24ced496cf71df5}{rtoa\+\_\+scalar} (x)
\item 
character(string) function \hyperlink{namespacedc__string_af27310b1b3e5bfd454f243edbdc00f16}{rtoa\+\_\+array} (rbuf)
\item 
character(token) function \hyperlink{namespacedc__string_a94b18df7fa694b5e9d0fc8aab5d8f860}{dtoa\+\_\+scalar} (d)
\item 
character(string) function \hyperlink{namespacedc__string_a3d8abf6f8e3e44604421dba121b7e3a8}{dtoa\+\_\+array} (dbuf)
\item 
character(token) function \hyperlink{namespacedc__string_a07c336dccdc62ed8e72bdeab6cba2a60}{ltoa\+\_\+scalar} (l)
\item 
character(string) function \hyperlink{namespacedc__string_a2b105322a0902882be51d1d8424be96f}{ltoa\+\_\+array} (lbuf)
\item 
character(string) function, public \hyperlink{namespacedc__string_a20412554f8f648165d202319119cf628}{joinchar} (carray, expr)
\item 
subroutine \hyperlink{namespacedc__string_a7436a4bd0e4cce6b86a6a18a47af21e4}{concat\+\_\+tail} (carray, str, result)
\item 
character(string) function, dimension(1) \hyperlink{namespacedc__string_a6d092cdef18c7069c65bd7034cd7ac5c}{str\+\_\+to\+\_\+array1} (c1)
\item 
character(string) function, dimension(2) \hyperlink{namespacedc__string_a8436219baa185e142dd5e926afc492d4}{str\+\_\+to\+\_\+array2} (c1, c2)
\item 
character(string) function, dimension(3) \hyperlink{namespacedc__string_a9663dca299a03c4bc899d54664151bdd}{str\+\_\+to\+\_\+array3} (c1, c2, c3)
\item 
character(string) function, dimension(4) \hyperlink{namespacedc__string_ad3f263a78a169110e0a898f063cae6f4}{str\+\_\+to\+\_\+array4} (c1, c2, c3, c4)
\item 
character(string) function, dimension(5) \hyperlink{namespacedc__string_a55637917189e0aeeff7d1188b00124a5}{str\+\_\+to\+\_\+array5} (c1, c2, c3, c4, c5)
\item 
character(string) function, dimension(6) \hyperlink{namespacedc__string_a97a51095f7c7c2774101561a4e3c3bda}{str\+\_\+to\+\_\+array6} (c1, c2, c3, c4, c5, c6)
\item 
character(string) function, dimension(7) \hyperlink{namespacedc__string_a76fdd961b37635d45041f87069c72229}{str\+\_\+to\+\_\+array7} (c1, c2, c3, c4, c5, c6, c7)
\item 
character(string) function, dimension(8) \hyperlink{namespacedc__string_a0a3f693afdfeb90ad3904875f7d1e1ec}{str\+\_\+to\+\_\+array8} (c1, c2, c3, c4, c5, c6, c7, c8)
\item 
character(string) function, dimension(9) \hyperlink{namespacedc__string_ae9bf4040729d42eae02a60ec69f7879a}{str\+\_\+to\+\_\+array9} (c1, c2, c3, c4, c5, c6, c7, c8, c9)
\item 
character(string) function, dimension(10) \hyperlink{namespacedc__string_a105cae402bea4d576aafb55b83b13dde}{str\+\_\+to\+\_\+array10} (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10)
\item 
character(string) function, dimension(11) \hyperlink{namespacedc__string_a5f7763768ea71bedfefee8b4a335cef1}{str\+\_\+to\+\_\+array11} (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11)
\item 
character(string) function, dimension(12) \hyperlink{namespacedc__string_a15de75053d87bb1bfde250302b326407}{str\+\_\+to\+\_\+array12} (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12)
\item 
subroutine \hyperlink{namespacedc__string_aec7653322f12260e2e09fbf295db72a5}{split\+\_\+cc} (str, carray, sep, limit)
\item 
integer function, public \hyperlink{namespacedc__string_a874854651654046879b09042ab96e0af}{index\+\_\+ofs} (string, start, substr)
\item 
recursive character(strlen) function, public \hyperlink{namespacedc__string_a23f0741c832644a6fd1dbcb738a3e0d8}{replace} (string, from, to, recursive, start\+\_\+pos)
\item 
subroutine \hyperlink{namespacedc__string_a7064ab7b967f27eb83cbbb18ce4f05c0}{cupper} (ch)
\item 
subroutine \hyperlink{namespacedc__string_a0599d92c007b2589d5a6697a9016d35e}{clower} (ch)
\item 
character(string) function, public \hyperlink{namespacedc__string_ab860a24280cb12470c2809f3fa9a5195}{uchar} (ch)
\item 
character(string) function, public \hyperlink{namespacedc__string_a2164252ef193c75eb7d27d5bac30ccb5}{lchar} (ch)
\item 
character(string) function, public \hyperlink{namespacedc__string_aed117758b7d6107ddf632cd71d66f0bd}{roundnum} (num)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacedc__string_a99ccb65c9cc508e03d50f4844fac9aee}\label{namespacedc__string_a99ccb65c9cc508e03d50f4844fac9aee}} 
\index{dc\+\_\+string@{dc\+\_\+string}!atod\+\_\+scalar@{atod\+\_\+scalar}}
\index{atod\+\_\+scalar@{atod\+\_\+scalar}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{atod\+\_\+scalar()}{atod\_scalar()}}
{\footnotesize\ttfamily real(dp) function dc\+\_\+string\+::atod\+\_\+scalar (\begin{DoxyParamCaption}\item[{character(len = $\ast$), intent(in)}]{string\+\_\+in }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 557 of file dc\+\_\+string.\+f90.



References dc\+\_\+types\+::string.


\begin{DoxyCode}
557     \textcolor{comment}{!}
558     \textcolor{comment}{! string で与えられる文字型変数を、倍精度実数型変数にして返します。}
559     \textcolor{comment}{! もしも string が数値に変換できない場合、0.0 が返ります。}
560     \textcolor{comment}{!}
561     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
562     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: string\_in
563     \textcolor{keywordtype}{integer}:: ios
564     \textcolor{keywordtype}{character(len = STRING)}:: buffer
565     \textcolor{keywordtype}{integer}:: ipoint, iexp
566     \textcolor{keywordtype}{intrinsic} scan
567 
568     \textcolor{keywordflow}{continue}
569 
570     buffer = string\_in
571     \textcolor{comment}{! もし整定数をいれてしまった場合は小数点を附加}
572     \textcolor{keywordflow}{if} (index(buffer, \textcolor{stringliteral}{'.'}) == 0) \textcolor{keywordflow}{then}
573       iexp = scan(buffer, \textcolor{stringliteral}{"eEdD"})
574       \textcolor{keywordflow}{if} (iexp /= 0) \textcolor{keywordflow}{then}
575         buffer(iexp+1: len(buffer)) = buffer(iexp: len(buffer)-1)
576         ipoint = iexp
577       \textcolor{keywordflow}{else}
578         ipoint = len\_trim(buffer) + 1
579 \textcolor{keywordflow}{      endif}
580       buffer(ipoint: ipoint) = \textcolor{stringliteral}{'.'}
581 \textcolor{keywordflow}{    endif}
582     \textcolor{keyword}{read}(unit=buffer, fmt=\textcolor{stringliteral}{"(g80.10)"}, iostat=ios) result
583     \textcolor{keywordflow}{if} (ios /= 0) result = 0.0
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a922cc3624ab8fbcffc417e8116cff96e}\label{namespacedc__string_a922cc3624ab8fbcffc417e8116cff96e}} 
\index{dc\+\_\+string@{dc\+\_\+string}!atoi\+\_\+scalar@{atoi\+\_\+scalar}}
\index{atoi\+\_\+scalar@{atoi\+\_\+scalar}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{atoi\+\_\+scalar()}{atoi\_scalar()}}
{\footnotesize\ttfamily integer function dc\+\_\+string\+::atoi\+\_\+scalar (\begin{DoxyParamCaption}\item[{character(len = $\ast$), intent(in)}]{string,  }\item[{integer, intent(in), optional}]{default }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 535 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
535     \textcolor{comment}{!}
536     \textcolor{comment}{! string で与えられる文字型変数を、整数型変数にして返します。}
537     \textcolor{comment}{! もしも string が数値に変換できない場合、default が返ります。}
538     \textcolor{comment}{! default を指定しない場合は 0 が返ります。}
539     \textcolor{comment}{!}
540     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
541     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: \hyperlink{namespacegtool__history__internal_aa7fc82d2ca1961a254be1acb599afbb1}{default}
542     \textcolor{keywordtype}{integer}:: ios
543 
544     \textcolor{keywordflow}{continue}
545 
546     \textcolor{keyword}{read}(unit=\hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, fmt=\textcolor{stringliteral}{"(i80)"}, iostat=ios) result
547     \textcolor{keywordflow}{if} (ios /= 0) \textcolor{keywordflow}{then}
548       \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(\hyperlink{namespacegtool__history__internal_aa7fc82d2ca1961a254be1acb599afbb1}{default})) \textcolor{keywordflow}{then}
549         result = \hyperlink{namespacegtool__history__internal_aa7fc82d2ca1961a254be1acb599afbb1}{default}
550       \textcolor{keywordflow}{else}
551         result = 0
552 \textcolor{keywordflow}{      endif}
553 \textcolor{keywordflow}{    endif}
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a0599d92c007b2589d5a6697a9016d35e}\label{namespacedc__string_a0599d92c007b2589d5a6697a9016d35e}} 
\index{dc\+\_\+string@{dc\+\_\+string}!clower@{clower}}
\index{clower@{clower}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{clower()}{clower()}}
{\footnotesize\ttfamily subroutine dc\+\_\+string\+::clower (\begin{DoxyParamCaption}\item[{character(len = $\ast$), intent(inout)}]{ch }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1368 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
1368     \textcolor{comment}{!}
1369     \textcolor{comment}{! 文字列 ch に英字が含まれる場合、その英字を小文字に変換して ch}
1370     \textcolor{comment}{! に返します。 英字でない文字や既に小文字になっている文字は}
1371     \textcolor{comment}{! そのまま返します。}
1372     \textcolor{comment}{!}
1373     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(inout)}:: ch
1374     \textcolor{keywordtype}{integer}:: i, lch, idx
1375   \textcolor{keywordflow}{continue}
1376     lch = len(ch)
1377     \textcolor{keywordflow}{do}, i = 1, lch
1378       idx = ichar(ch(i:i))
1379       \textcolor{keywordflow}{if} (65 <= idx .and. idx <= 90) \textcolor{keywordflow}{then}
1380         ch(i:i)=char(idx + 32)
1381 \textcolor{keywordflow}{      end if}
1382 \textcolor{keywordflow}{    end do}
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a7436a4bd0e4cce6b86a6a18a47af21e4}\label{namespacedc__string_a7436a4bd0e4cce6b86a6a18a47af21e4}} 
\index{dc\+\_\+string@{dc\+\_\+string}!concat\+\_\+tail@{concat\+\_\+tail}}
\index{concat\+\_\+tail@{concat\+\_\+tail}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{concat\+\_\+tail()}{concat\_tail()}}
{\footnotesize\ttfamily subroutine dc\+\_\+string\+::concat\+\_\+tail (\begin{DoxyParamCaption}\item[{character($\ast$), dimension(\+:), intent(in)}]{carray,  }\item[{character($\ast$), intent(in)}]{str,  }\item[{character(string), dimension(\+:), pointer}]{result }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 893 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
893     \textcolor{comment}{!}
894     \textcolor{comment}{! 文字型配列 *carray* の各成分の末尾に *str* を追加して}
895     \textcolor{comment}{! *result* に返します。*carray* の各成分の末尾の空白は無視されます。}
896     \textcolor{comment}{!}
897     \textcolor{comment}{! result(:) の配列サイズは carray のサイズに応じて自動的に決まります。}
898     \textcolor{comment}{! ただし、result(:) は必ず空状態または不定状態で与えてください。}
899     \textcolor{comment}{! 既に割り付けられている場合、メモリリークを起こします。}
900     \textcolor{comment}{!}
901     \textcolor{keywordtype}{implicit none}
902     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}  :: carray(:)
903     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}  :: str
904     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{pointer}:: result(:) \textcolor{comment}{! (out)}
905     \textcolor{keywordtype}{integer}                     :: i, size\_carray
906   \textcolor{keywordflow}{continue}
907     size\_carray = \textcolor{keyword}{size}(carray)
908     \textcolor{keyword}{allocate}(result(size\_carray))
909 
910     \textcolor{keywordflow}{do} i = 1, size\_carray
911       result(i) = trim(carray(i)) // str
912 \textcolor{keywordflow}{    end do}
913 
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a7064ab7b967f27eb83cbbb18ce4f05c0}\label{namespacedc__string_a7064ab7b967f27eb83cbbb18ce4f05c0}} 
\index{dc\+\_\+string@{dc\+\_\+string}!cupper@{cupper}}
\index{cupper@{cupper}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{cupper()}{cupper()}}
{\footnotesize\ttfamily subroutine dc\+\_\+string\+::cupper (\begin{DoxyParamCaption}\item[{character(len = $\ast$), intent(inout)}]{ch }\end{DoxyParamCaption})}



Definition at line 1350 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
1350     \textcolor{comment}{!}
1351     \textcolor{comment}{! 文字列 ch に英字が含まれる場合、その英字を大文字に変換して ch}
1352     \textcolor{comment}{! に返します。 英字でない文字や既に大文字になっている文字は}
1353     \textcolor{comment}{! そのまま返します。}
1354     \textcolor{comment}{!}
1355     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(inout)}:: ch
1356     \textcolor{keywordtype}{integer}:: i, lch, idx
1357   \textcolor{keywordflow}{continue}
1358     lch = len(ch)
1359     \textcolor{keywordflow}{do}, i = 1, lch
1360       idx = ichar(ch(i:i))
1361       \textcolor{keywordflow}{if} (97 <= idx .and. idx <= 122) \textcolor{keywordflow}{then}
1362         ch(i:i)=char(idx - 32)
1363 \textcolor{keywordflow}{      end if}
1364 \textcolor{keywordflow}{    end do}
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a3d8abf6f8e3e44604421dba121b7e3a8}\label{namespacedc__string_a3d8abf6f8e3e44604421dba121b7e3a8}} 
\index{dc\+\_\+string@{dc\+\_\+string}!dtoa\+\_\+array@{dtoa\+\_\+array}}
\index{dtoa\+\_\+array@{dtoa\+\_\+array}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{dtoa\+\_\+array()}{dtoa\_array()}}
{\footnotesize\ttfamily character(string) function dc\+\_\+string\+::dtoa\+\_\+array (\begin{DoxyParamCaption}\item[{real(dp), dimension(\+:), intent(in)}]{dbuf }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 804 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
804     \textcolor{comment}{!}
805     \textcolor{comment}{! 倍精度実数型配列 dbuf(:) で与えられる数値を文字型変数にして返します。}
806     \textcolor{comment}{! 配列が与えられる場合、各要素をカンマと空白「<tt>, </tt>」}
807     \textcolor{comment}{! で区切って返します。}
808     \textcolor{comment}{!}
809     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: dbuf(:)
810     \textcolor{keywordtype}{integer}:: i
811   \textcolor{keywordflow}{continue}
812     \textcolor{keywordflow}{if} (\textcolor{keyword}{size}(dbuf) <= 0) \textcolor{keywordflow}{then}
813       result = \textcolor{stringliteral}{""}
814       \textcolor{keywordflow}{return}
815 \textcolor{keywordflow}{    endif}
816     result = \hyperlink{interfacedc__string_1_1tochar}{tochar}(dbuf(1))
817     \textcolor{keywordflow}{do}, i = 2, \textcolor{keyword}{size}(dbuf)
818       result = trim(result) // \textcolor{stringliteral}{", "} // trim(\hyperlink{interfacedc__string_1_1tochar}{tochar}(dbuf(i)))
819 \textcolor{keywordflow}{    enddo}
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a94b18df7fa694b5e9d0fc8aab5d8f860}\label{namespacedc__string_a94b18df7fa694b5e9d0fc8aab5d8f860}} 
\index{dc\+\_\+string@{dc\+\_\+string}!dtoa\+\_\+scalar@{dtoa\+\_\+scalar}}
\index{dtoa\+\_\+scalar@{dtoa\+\_\+scalar}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{dtoa\+\_\+scalar()}{dtoa\_scalar()}}
{\footnotesize\ttfamily character(token) function dc\+\_\+string\+::dtoa\+\_\+scalar (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{d }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 777 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
777     \textcolor{comment}{!}
778     \textcolor{comment}{! 倍精度実数型変数 d で与えられる数値を文字型変数にして返します。}
779     \textcolor{comment}{! 配列が与えられる場合、各要素をカンマと空白「<tt>, </tt>」}
780     \textcolor{comment}{! で区切って返します。}
781     \textcolor{comment}{!}
782     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: d
783     \textcolor{keywordtype}{character(len = 32)}:: buffer, expbuf
784     \textcolor{keywordtype}{integer}:: ptr, eptr
785   \textcolor{keywordflow}{continue}
786     \textcolor{keyword}{write}(unit=buffer, fmt=\textcolor{stringliteral}{"(g32.24)"}) d
787     eptr = scan(buffer, \textcolor{stringliteral}{"eE"}, back=.true.)
788     expbuf = \textcolor{stringliteral}{''}
789     \textcolor{keywordflow}{if} (eptr > 1) \textcolor{keywordflow}{then}
790       expbuf = buffer(eptr: )
791       buffer(eptr: ) = \textcolor{stringliteral}{" "}
792 \textcolor{keywordflow}{    end if}
793 
794     ptr = verify(buffer, \textcolor{stringliteral}{" 0"}, back=.true.)
795     \textcolor{keywordflow}{if} (ptr > 0) buffer(ptr+1: ) = \textcolor{stringliteral}{" "}
796 
797     \textcolor{keywordflow}{if} (eptr > 1) \textcolor{keywordflow}{then}
798       buffer = buffer(1:len\_trim(buffer)) // expbuf
799 \textcolor{keywordflow}{    end if}
800     result = adjustl(buffer)
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a874854651654046879b09042ab96e0af}\label{namespacedc__string_a874854651654046879b09042ab96e0af}} 
\index{dc\+\_\+string@{dc\+\_\+string}!index\+\_\+ofs@{index\+\_\+ofs}}
\index{index\+\_\+ofs@{index\+\_\+ofs}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{index\+\_\+ofs()}{index\_ofs()}}
{\footnotesize\ttfamily integer function, public \hyperlink{interfacedc__string_1_1index__ofs}{dc\+\_\+string\+::index\+\_\+ofs} (\begin{DoxyParamCaption}\item[{character(len = $\ast$), intent(in)}]{string,  }\item[{integer, intent(in)}]{start,  }\item[{character(len = $\ast$), intent(in)}]{substr }\end{DoxyParamCaption})}



Definition at line 1243 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
1243     \textcolor{comment}{!}
1244     \textcolor{comment}{! 文字列 string の start 文字目以降の文字列の中に substr}
1245     \textcolor{comment}{! の文字列が含まれている時、その開始文字位置を返します。}
1246     \textcolor{comment}{! 含まれない場合は 0 を返します。}
1247     \textcolor{comment}{! 返される開始文字位置は文字列 string の先頭から数えます。}
1248     \textcolor{comment}{!}
1249     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
1250     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: start
1251     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: substr
1252     \textcolor{keywordtype}{intrinsic} index
1253     \textcolor{keywordflow}{if} (start < 1) \textcolor{keywordflow}{then}
1254       result = 0
1255       \textcolor{keywordflow}{return}
1256 \textcolor{keywordflow}{    endif}
1257     result = index(\hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}(start: ), substr)
1258     \textcolor{keywordflow}{if} (result == 0) \textcolor{keywordflow}{return}
1259     result = start + result - 1
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a06930bb729b4054b11cd037394f488be}\label{namespacedc__string_a06930bb729b4054b11cd037394f488be}} 
\index{dc\+\_\+string@{dc\+\_\+string}!itoa\+\_\+array@{itoa\+\_\+array}}
\index{itoa\+\_\+array@{itoa\+\_\+array}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{itoa\+\_\+array()}{itoa\_array()}}
{\footnotesize\ttfamily character(string) function dc\+\_\+string\+::itoa\+\_\+array (\begin{DoxyParamCaption}\item[{integer, dimension(\+:), intent(in)}]{ibuf }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 712 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
712     \textcolor{comment}{!}
713     \textcolor{comment}{! 整数型配列変数 ibuf(:) で与えられる数値を文字型変数にして返します。}
714     \textcolor{comment}{! 配列が与えられる場合、各要素をカンマと空白「<tt>, </tt>」}
715     \textcolor{comment}{! で区切って返します。}
716     \textcolor{comment}{!}
717     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ibuf(:)
718     \textcolor{keywordtype}{integer}:: i
719   \textcolor{keywordflow}{continue}
720     \textcolor{keywordflow}{if} (\textcolor{keyword}{size}(ibuf) <= 0) \textcolor{keywordflow}{then}
721       result = \textcolor{stringliteral}{""}
722       \textcolor{keywordflow}{return}
723 \textcolor{keywordflow}{    endif}
724     result = \hyperlink{interfacedc__string_1_1tochar}{tochar}(ibuf(1))
725     \textcolor{keywordflow}{do}, i = 2, \textcolor{keyword}{size}(ibuf)
726       result = trim(result) // \textcolor{stringliteral}{", "} // trim(\hyperlink{interfacedc__string_1_1tochar}{tochar}(ibuf(i)))
727 \textcolor{keywordflow}{    enddo}
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_af817740976530623403aa9f474d06a5c}\label{namespacedc__string_af817740976530623403aa9f474d06a5c}} 
\index{dc\+\_\+string@{dc\+\_\+string}!itoa\+\_\+scalar@{itoa\+\_\+scalar}}
\index{itoa\+\_\+scalar@{itoa\+\_\+scalar}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{itoa\+\_\+scalar()}{itoa\_scalar()}}
{\footnotesize\ttfamily character(token) function dc\+\_\+string\+::itoa\+\_\+scalar (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{i }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 699 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
699     \textcolor{comment}{!}
700     \textcolor{comment}{! 整数型変数 i で与えられる数値を文字型変数にして返します。}
701     \textcolor{comment}{! 配列が与えられる場合、各要素をカンマと空白「<tt>, </tt>」}
702     \textcolor{comment}{! で区切って返します。}
703     \textcolor{comment}{!}
704     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: i
705     \textcolor{keywordtype}{character(len = 32)}:: buffer
706   \textcolor{keywordflow}{continue}
707     \textcolor{keyword}{write}(unit=buffer, fmt=\textcolor{stringliteral}{"(i20)"}) i
708     result = adjustl(buffer)
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a20412554f8f648165d202319119cf628}\label{namespacedc__string_a20412554f8f648165d202319119cf628}} 
\index{dc\+\_\+string@{dc\+\_\+string}!joinchar@{joinchar}}
\index{joinchar@{joinchar}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{joinchar()}{joinchar()}}
{\footnotesize\ttfamily character(string) function, public dc\+\_\+string\+::joinchar (\begin{DoxyParamCaption}\item[{character($\ast$), dimension(\+:), intent(in)}]{carray,  }\item[{character($\ast$), intent(in), optional}]{expr }\end{DoxyParamCaption})}



Definition at line 861 of file dc\+\_\+string.\+f90.



Referenced by actual\+\_\+iorange\+\_\+dump(), dc\+\_\+args\+::dcargsget0(), dc\+\_\+args\+::dcargshelp0(), dc\+\_\+args\+::dcargsputline0(), dc\+\_\+hash\+::dchashputline0(), historyaddattrchar0(), historyaddattrdouble0(), historyaddattrdouble1(), historyaddattrint0(), historyaddattrint1(), historyaddattrlogical0(), historyaddattrreal0(), historyaddattrreal1(), historyaddvariable1(), historyaddvariable2(), historyautoaddvariable1(), historyautoallvarfix(), historyautoclose1(), historyautocreate1(), historyautocreate2(), historyautocreate3(), historyaxisaddattrchar0(), historyaxisaddattrdouble0(), historyaxisaddattrdouble1(), historyaxisaddattrint0(), historyaxisaddattrint1(), historyaxisaddattrlogical0(), historyaxisaddattrreal0(), historyaxisaddattrreal1(), historycreate1(), historycreate2(), historygetdouble0(), historygetdouble1(), historygetdouble2(), historygetdouble3(), historygetdouble4(), historygetdouble5(), historygetdouble6(), historygetdouble7(), historygetint0(), historygetint1(), historygetint2(), historygetint3(), historygetint4(), historygetint5(), historygetint6(), historygetint7(), historygetreal0(), historygetreal1(), historygetreal2(), historygetreal3(), historygetreal4(), historygetreal5(), historygetreal6(), historygetreal7(), historygettattrchar0(), historygettattrdouble0(), historygettattrdouble1(), historygettattrint0(), historygettattrint1(), historygettattrreal0(), historygettattrreal1(), historyputcharex(), historyputdoubleex(), historyputintex(), historyputline(), historyputrealex(), historyvarinfoaddattrchar0(), historyvarinfoaddattrdouble0(), historyvarinfoaddattrdouble1(), historyvarinfoaddattrint0(), historyvarinfoaddattrint1(), historyvarinfoaddattrlogical0(), historyvarinfoaddattrreal0(), historyvarinfoaddattrreal1(), historyvarinfocopy1(), gtool\+\_\+historyauto\+\_\+internal\+::hstfilecreate(), hstnmlinfoadd(), hstnmlinfoallnamevalid(), hstnmlinfoallvarinicheck(), hstnmlinfoassocgthist(), hstnmlinfoclose(), hstnmlinfocreate(), hstnmlinfodelete(), hstnmlinfoenddefine(), hstnmlinfogetnames(), hstnmlinfoinquire(), hstnmlinfonames(), hstnmlinfooutputstep(), hstnmlinfooutputstepdisable(), hstnmlinfooutputvalid(), hstnmlinfoputline(), hstnmlinforedefine(), hstnmlinforesetdefault(), and hstnmlinfosetvalidname().


\begin{DoxyCode}
861     \textcolor{comment}{!}
862     \textcolor{comment}{! 文字型配列 carray に与えた複数の文字列をカンマと空白}
863     \textcolor{comment}{! 「<tt>, </tt>」 で区切った1つの文字列にして返します。}
864     \textcolor{comment}{! expr に文字列を与えると、その文字列を区切り文字として用います。}
865     \textcolor{comment}{!}
866     \textcolor{keywordtype}{implicit none}
867     \textcolor{keywordtype}{character(*)}     , \textcolor{keywordtype}{intent(in)}           :: carray(:)
868     \textcolor{keywordtype}{character(*)}     , \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional} :: expr
869 
870     \textcolor{keywordtype}{character(2)}     ,\textcolor{keywordtype}{parameter} :: \hyperlink{namespacegtool__history__internal_aa7fc82d2ca1961a254be1acb599afbb1}{default} = \textcolor{stringliteral}{', '}
871     \textcolor{keywordtype}{character(STRING)}           :: delimiter
872     \textcolor{keywordtype}{integer}                     :: dellen, i
873   \textcolor{keywordflow}{continue}
874     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(expr) ) \textcolor{keywordflow}{then}
875       delimiter = expr
876       dellen = len(expr)
877     \textcolor{keywordflow}{else}
878       delimiter = \hyperlink{namespacegtool__history__internal_aa7fc82d2ca1961a254be1acb599afbb1}{default}
879       dellen = len(\hyperlink{namespacegtool__history__internal_aa7fc82d2ca1961a254be1acb599afbb1}{default})
880 \textcolor{keywordflow}{    endif}
881     \textcolor{keywordflow}{if} (\textcolor{keyword}{size}(carray) <= 0) \textcolor{keywordflow}{then}
882       result = \textcolor{stringliteral}{""}
883       \textcolor{keywordflow}{return}
884 \textcolor{keywordflow}{    endif}
885     result = trim(carray(1))
886     \textcolor{keywordflow}{do}, i = 2, \textcolor{keyword}{size}(carray)
887       result = trim(result) // delimiter(1:dellen) // trim(carray(i))
888 \textcolor{keywordflow}{    enddo}
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a2164252ef193c75eb7d27d5bac30ccb5}\label{namespacedc__string_a2164252ef193c75eb7d27d5bac30ccb5}} 
\index{dc\+\_\+string@{dc\+\_\+string}!lchar@{lchar}}
\index{lchar@{lchar}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{lchar()}{lchar()}}
{\footnotesize\ttfamily character(string) function, public \hyperlink{interfacedc__string_1_1lchar}{dc\+\_\+string\+::lchar} (\begin{DoxyParamCaption}\item[{character(len = $\ast$), intent(in)}]{ch }\end{DoxyParamCaption})}



Definition at line 1397 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
1397     \textcolor{comment}{!}
1398     \textcolor{comment}{! 文字列 ch に英字が含まれる場合、その英字を小文字に変換して返します。}
1399     \textcolor{comment}{! 英字でない文字や既に小文字になっている文字はそのまま返します。}
1400     \textcolor{comment}{!}
1401     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: ch
1402   \textcolor{keywordflow}{continue}
1403     result = ch
1404     \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1tolower}{tolower}(result)
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a2b105322a0902882be51d1d8424be96f}\label{namespacedc__string_a2b105322a0902882be51d1d8424be96f}} 
\index{dc\+\_\+string@{dc\+\_\+string}!ltoa\+\_\+array@{ltoa\+\_\+array}}
\index{ltoa\+\_\+array@{ltoa\+\_\+array}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{ltoa\+\_\+array()}{ltoa\_array()}}
{\footnotesize\ttfamily character(string) function dc\+\_\+string\+::ltoa\+\_\+array (\begin{DoxyParamCaption}\item[{logical, dimension(\+:), intent(in)}]{lbuf }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 838 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
838     \textcolor{comment}{!}
839     \textcolor{comment}{! 論理型配列 lbuf(:) で与えられる数値を文字型変数にして返します。}
840     \textcolor{comment}{! 配列が与えられる場合、各要素をカンマと空白「<tt>, </tt>」}
841     \textcolor{comment}{! で区切って返します。}
842     \textcolor{comment}{!}
843     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: lbuf(:)
844     \textcolor{keywordtype}{integer}:: i
845   \textcolor{keywordflow}{continue}
846     \textcolor{keywordflow}{if} (\textcolor{keyword}{size}(lbuf) <= 0) \textcolor{keywordflow}{then}
847       result = \textcolor{stringliteral}{""}
848       \textcolor{keywordflow}{return}
849 \textcolor{keywordflow}{    endif}
850     result = \hyperlink{interfacedc__string_1_1tochar}{tochar}(lbuf(1))
851     \textcolor{keywordflow}{do}, i = 2, \textcolor{keyword}{size}(lbuf)
852       result = trim(result) // \textcolor{stringliteral}{", "} // trim(\hyperlink{interfacedc__string_1_1tochar}{tochar}(lbuf(i)))
853 \textcolor{keywordflow}{    enddo}
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a07c336dccdc62ed8e72bdeab6cba2a60}\label{namespacedc__string_a07c336dccdc62ed8e72bdeab6cba2a60}} 
\index{dc\+\_\+string@{dc\+\_\+string}!ltoa\+\_\+scalar@{ltoa\+\_\+scalar}}
\index{ltoa\+\_\+scalar@{ltoa\+\_\+scalar}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{ltoa\+\_\+scalar()}{ltoa\_scalar()}}
{\footnotesize\ttfamily character(token) function dc\+\_\+string\+::ltoa\+\_\+scalar (\begin{DoxyParamCaption}\item[{logical, intent(in)}]{l }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 823 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
823     \textcolor{comment}{!}
824     \textcolor{comment}{! 論理型変数 l で与えられる数値を文字型変数にして返します。}
825     \textcolor{comment}{! 配列が与えられる場合、各要素をカンマと空白「<tt>, </tt>」}
826     \textcolor{comment}{! で区切って返します。}
827     \textcolor{comment}{!}
828     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: l
829   \textcolor{keywordflow}{continue}
830     \textcolor{keywordflow}{if} (l) \textcolor{keywordflow}{then}
831       result = \textcolor{stringliteral}{".true."}
832     \textcolor{keywordflow}{else}
833       result = \textcolor{stringliteral}{".false."}
834 \textcolor{keywordflow}{    end if}
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a23f0741c832644a6fd1dbcb738a3e0d8}\label{namespacedc__string_a23f0741c832644a6fd1dbcb738a3e0d8}} 
\index{dc\+\_\+string@{dc\+\_\+string}!replace@{replace}}
\index{replace@{replace}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{replace()}{replace()}}
{\footnotesize\ttfamily recursive character(strlen) function, public \hyperlink{interfacedc__string_1_1replace}{dc\+\_\+string\+::replace} (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{string,  }\item[{character($\ast$), intent(in)}]{from,  }\item[{character($\ast$), intent(in)}]{to,  }\item[{logical, intent(in), optional}]{recursive,  }\item[{integer, intent(in), optional}]{start\+\_\+pos }\end{DoxyParamCaption})}



Definition at line 1264 of file dc\+\_\+string.\+f90.



References dc\+\_\+types\+::string.


\begin{DoxyCode}
1264     \textcolor{comment}{!}
1265     \textcolor{comment}{! 文字列 *string* に文字列 *from* が含まれる場合, その部分を文字列 *to*}
1266     \textcolor{comment}{! に置換して返します. 文字列 *from* が含まれない場合は *string*}
1267     \textcolor{comment}{! をそのまま返します. *from* が複数含まれる場合, 先頭の *from*}
1268     \textcolor{comment}{! のみが置換されます.}
1269     \textcolor{comment}{!}
1270     \textcolor{comment}{! 全ての *from* を *to* へ変換したい場合には,}
1271     \textcolor{comment}{! オプショナル引数 *recursive* に .true. を与えてください.}
1272     \textcolor{comment}{!}
1273     \textcolor{comment}{! デフォルトでは, 文字列の最初から検索を行います.}
1274     \textcolor{comment}{! オプショナル引数 *start\_pos* を与える場合,}
1275     \textcolor{comment}{! *start\_pos* 文字目から検索を行います.}
1276     \textcolor{comment}{!}
1277     \textcolor{comment}{! If a string *from* is included in *string*, the string is}
1278     \textcolor{comment}{! replace to *to*, and the replaced string is returned.}
1279     \textcolor{comment}{! If a string *from* is not included, *string* is returned}
1280     \textcolor{comment}{! without change.}
1281     \textcolor{comment}{! When multiple *from* are included, only first *from* is replaced.}
1282     \textcolor{comment}{!}
1283     \textcolor{comment}{! In order to replace all *from* to *to*, give ".true." to}
1284     \textcolor{comment}{! optional argument *recursive*.}
1285     \textcolor{comment}{!}
1286     \textcolor{comment}{! By default, the string is searched from the top.}
1287     \textcolor{comment}{! If optional argument *start\_pos* is given,}
1288     \textcolor{comment}{! the search is started from *start\_pos*.}
1289     \textcolor{comment}{!}
1290     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: strlen => \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
1291     \textcolor{keywordtype}{implicit none}
1292     \textcolor{keywordtype}{character(STRLEN)}:: result
1293     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, from, to
1294     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: recursive
1295     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: start\_pos
1296     \textcolor{keywordtype}{integer}:: sp
1297     \textcolor{keywordtype}{integer}:: i, isa, isb, iea, ieb
1298     \textcolor{keywordtype}{integer}:: ir
1299   \textcolor{keywordflow}{continue}
1300     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(start\_pos) ) \textcolor{keywordflow}{then}
1301       sp = start\_pos
1302     \textcolor{keywordflow}{else}
1303       sp = 1
1304 \textcolor{keywordflow}{    end if}
1305     \textcolor{keywordflow}{if} ( sp < 1 ) \textcolor{keywordflow}{then}
1306       sp = 1
1307 \textcolor{keywordflow}{    end if}
1308 
1309     result = \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
1310     i = index(result(sp:), from)
1311     \textcolor{keywordflow}{if} (i == 0) \textcolor{keywordflow}{return}
1312     i = i + sp - 1
1313     isa = i + len(from)
1314     isb = i + len(to)
1315     \textcolor{keywordflow}{if} (len(to) < len(from)) \textcolor{keywordflow}{then}
1316       iea = len(result)
1317       ieb = len(result) + len(to) - len(from)
1318     \textcolor{keywordflow}{else}
1319       iea = len(result) + len(from) - len(to)
1320       ieb = len(result)
1321 \textcolor{keywordflow}{    endif}
1322     \textcolor{keywordflow}{if} (len(to) /= len(from)) result(isb:ieb) = result(isa:iea)
1323     result(i:i+len(to)-1) = to
1324 
1325     \textcolor{comment}{!-----------------------------------}
1326     \textcolor{comment}{!  再帰的処理}
1327     \textcolor{comment}{!  Recursive process}
1328     ir = index(result(i+len(to):), from)
1329     \textcolor{keywordflow}{if} ( len\_trim(from) == 0 ) \textcolor{keywordflow}{then}
1330       ir = index(trim(result(i+len(to):)), from)
1331 \textcolor{keywordflow}{    end if}
1332     \textcolor{keywordflow}{if} (ir /= 0) \textcolor{keywordflow}{then}
1333       \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(\textcolor{keywordtype}{recursive}) ) \textcolor{keywordflow}{then}
1334         \textcolor{keywordflow}{if} ( \textcolor{keywordtype}{recursive} ) \textcolor{keywordflow}{then}
1335           result = \hyperlink{interfacedc__string_1_1replace}{replace}( \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string} = result, &
1336             &               from = from, to = to, &
1337             &               \textcolor{keywordtype}{recursive} = \textcolor{keywordtype}{recursive}, &
1338             &               start\_pos = i+len(to) )
1339 \textcolor{keywordflow}{        end if}
1340 \textcolor{keywordflow}{      end if}
1341 \textcolor{keywordflow}{    end if}
1342 
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_aed117758b7d6107ddf632cd71d66f0bd}\label{namespacedc__string_aed117758b7d6107ddf632cd71d66f0bd}} 
\index{dc\+\_\+string@{dc\+\_\+string}!roundnum@{roundnum}}
\index{roundnum@{roundnum}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{roundnum()}{roundnum()}}
{\footnotesize\ttfamily character(string) function, public \hyperlink{interfacedc__string_1_1roundnum}{dc\+\_\+string\+::roundnum} (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{num }\end{DoxyParamCaption})}



Definition at line 1408 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
1408     \textcolor{comment}{!}
1409     \textcolor{comment}{! '0.30000001' や '12.999998' などの丸め誤差によって端数が残って}
1410     \textcolor{comment}{! しまっている数値表記を '0.3' や '13.' などに整形して返します.}
1411     \textcolor{comment}{!}
1412     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: num
1413     \textcolor{keywordtype}{character(STRING)}:: nrv, enrv
1414     \textcolor{keywordtype}{integer}:: i, moving\_up, nrvi, dig, zero\_stream
1415   \textcolor{keywordflow}{continue}
1416     \textcolor{comment}{!}
1417     \textcolor{comment}{! 実数でないものについてはそのまま返す.}
1418     \textcolor{comment}{!}
1419     \textcolor{keywordflow}{if} ( scan(\textcolor{stringliteral}{'.'}, trim(num) ) == 0  ) \textcolor{keywordflow}{then}
1420       result = num
1421       \textcolor{keywordflow}{return}
1422 \textcolor{keywordflow}{    end if}
1423     nrv = num
1424 
1425     \textcolor{comment}{!}
1426     \textcolor{comment}{! 指数部を避けておく.}
1427     \textcolor{comment}{!}
1428     enrv = \textcolor{stringliteral}{''}
1429     i = scan(nrv, \textcolor{stringliteral}{"eE"}, back=.true.)
1430     \textcolor{keywordflow}{if} ( i > 1  ) \textcolor{keywordflow}{then}
1431       enrv = nrv(i:)
1432       nrv(i:) = \textcolor{stringliteral}{" "}
1433     \textcolor{keywordflow}{elseif} ( i == 1 ) \textcolor{keywordflow}{then}
1434       result = nrv
1435       \textcolor{keywordflow}{return}
1436 \textcolor{keywordflow}{    end if}
1437 
1438     \textcolor{comment}{!}
1439     \textcolor{comment}{! 0.30000001 などの末尾の 1 のような, ゴミの桁の数値を掃除し,}
1440     \textcolor{comment}{! 0.3000000 などに整形.}
1441     \textcolor{comment}{!}
1442     \textcolor{keywordflow}{if} ( index( trim( nrv ), \textcolor{stringliteral}{'.'}) - len\_trim( nrv ) < -7 ) \textcolor{keywordflow}{then}
1443       \textcolor{keywordflow}{do} \textcolor{keywordflow}{while} ( index(\textcolor{stringliteral}{'567890.'}, nrv(len\_trim(nrv):len\_trim(nrv)) ) == 0 )
1444         \textcolor{keywordflow}{if} ( len\_trim(nrv) < 2 ) \textcolor{keywordflow}{exit}
1445         nrv = nrv(1:len\_trim(nrv)-1)
1446 \textcolor{keywordflow}{      end do}
1447 \textcolor{keywordflow}{    end if}
1448 
1449     \textcolor{comment}{!}
1450     \textcolor{comment}{! 0.30000001986 などの末尾の 1 以降のゴミの桁の数値を掃除し,}
1451     \textcolor{comment}{! 0.3000000 などに整形.}
1452     \textcolor{comment}{!}
1453     \textcolor{keywordflow}{if} ( index( trim( nrv ), \textcolor{stringliteral}{'.'}) - len\_trim( nrv ) < -7 ) \textcolor{keywordflow}{then}
1454       dig = index( trim( nrv ), \textcolor{stringliteral}{'.'}) + 1
1455       zero\_stream = 0
1456       \textcolor{keywordflow}{do} \textcolor{keywordflow}{while} ( dig < len\_trim( nrv ) )
1457         \textcolor{keywordflow}{if} ( nrv(dig:dig) == \textcolor{stringliteral}{"0"} ) \textcolor{keywordflow}{then}
1458           zero\_stream = zero\_stream + 1
1459         \textcolor{keywordflow}{else}
1460           zero\_stream = 0
1461 \textcolor{keywordflow}{        end if}
1462         \textcolor{keywordflow}{if} ( zero\_stream > 7 ) \textcolor{keywordflow}{then}
1463           nrv(dig:len\_trim(nrv)) = \textcolor{stringliteral}{'0'}
1464           \textcolor{keywordflow}{exit}
1465 \textcolor{keywordflow}{        end if}
1466         dig = dig + 1
1467 \textcolor{keywordflow}{      end do}
1468 \textcolor{keywordflow}{    end if}
1469 
1470     \textcolor{comment}{!}
1471     \textcolor{comment}{! 0.3000000 などの末尾の 0 を掃除し,}
1472     \textcolor{comment}{! 0.3 などに整形.}
1473     \textcolor{comment}{!}
1474     \textcolor{keywordflow}{if} ( index( trim( nrv ), \textcolor{stringliteral}{'.'}) /= 0 ) \textcolor{keywordflow}{then}
1475       \textcolor{keywordflow}{do} \textcolor{keywordflow}{while} ( index(\textcolor{stringliteral}{'123456789.'}, nrv(len\_trim(nrv):len\_trim(nrv)) ) == 0 )
1476         \textcolor{keywordflow}{if} ( len\_trim(nrv) < 2 ) \textcolor{keywordflow}{exit}
1477         nrv = nrv(1:len\_trim(nrv)-1)
1478 \textcolor{keywordflow}{      end do}
1479 \textcolor{keywordflow}{    end if}
1480 
1481     \textcolor{comment}{!}
1482     \textcolor{comment}{! 0.89999998 などの末尾の 8 のような, ゴミの桁の数値を掃除し,}
1483     \textcolor{comment}{! 0.8999999 などに整形.}
1484     \textcolor{comment}{!}
1485     moving\_up = 0
1486     \textcolor{keywordflow}{if} ( index( trim( nrv ), \textcolor{stringliteral}{'.'}) - len\_trim( nrv ) < -7 ) \textcolor{keywordflow}{then}
1487       \textcolor{keywordflow}{do} \textcolor{keywordflow}{while} ( index(\textcolor{stringliteral}{'12345690.'}, nrv(len\_trim(nrv):len\_trim(nrv)) ) == 0 )
1488         \textcolor{keywordflow}{if} ( len\_trim(nrv) < 2 ) \textcolor{keywordflow}{exit}
1489         nrv = nrv(1:len\_trim(nrv)-1)
1490 \textcolor{keywordflow}{      end do}
1491       moving\_up = 1
1492 \textcolor{keywordflow}{    end if}
1493 
1494     \textcolor{comment}{!}
1495     \textcolor{comment}{! 0.8999999 などの末尾の 9 を掃除し, 繰り上げて}
1496     \textcolor{comment}{! 0.9 などに整形.}
1497     \textcolor{comment}{!}
1498     \textcolor{keywordflow}{if} ( moving\_up > 0 ) \textcolor{keywordflow}{then}
1499       \textcolor{keywordflow}{do} \textcolor{keywordflow}{while} ( index(\textcolor{stringliteral}{'012345678.'}, nrv(len\_trim(nrv):len\_trim(nrv)) ) == 0 )
1500         \textcolor{keywordflow}{if} ( len\_trim(nrv) < 2 ) \textcolor{keywordflow}{exit}
1501         nrv = nrv(1:len\_trim(nrv)-1)
1502 \textcolor{keywordflow}{      end do}
1503 \textcolor{keywordflow}{    end if}
1504 
1505     i = len\_trim(nrv)
1506     \textcolor{keywordflow}{do} \textcolor{keywordflow}{while} ( moving\_up > 0 .and. i > 0 )
1507       \textcolor{keywordflow}{if} ( index(\textcolor{stringliteral}{'.'}, nrv(i:i)) /= 0 ) \textcolor{keywordflow}{then}
1508         i = i - 1
1509         cycle
1510 \textcolor{keywordflow}{      end if}
1511       nrvi = \hyperlink{interfacedc__string_1_1stoi}{stoi}( nrv(i:i) ) + moving\_up
1512 
1513       \textcolor{keywordflow}{if} ( nrvi < 10 ) \textcolor{keywordflow}{then}
1514         nrv(i:i) = trim( \hyperlink{interfacedc__string_1_1tochar}{tochar}( nrvi ) )
1515         \textcolor{keywordflow}{exit}
1516       \textcolor{keywordflow}{else}
1517         nrv(i:i) = \textcolor{stringliteral}{'0'}
1518         \textcolor{keywordflow}{if} ( i < 2 ) \textcolor{keywordflow}{then}
1519           nrv = \textcolor{stringliteral}{'10'}
1520           \textcolor{keywordflow}{exit}
1521         \textcolor{keywordflow}{else}
1522           i = i - 1
1523           cycle
1524 \textcolor{keywordflow}{        end if}
1525 \textcolor{keywordflow}{      end if}
1526       \textcolor{keywordflow}{if} ( len\_trim(nrv) < 2 ) \textcolor{keywordflow}{exit}
1527       nrv = nrv(1:len\_trim(nrv)-1)
1528 \textcolor{keywordflow}{    end do}
1529 
1530     \textcolor{comment}{!}
1531     \textcolor{comment}{! 0.3000000 などの末尾の 0 を掃除し,}
1532     \textcolor{comment}{! 0.3 などに整形.}
1533     \textcolor{comment}{!}
1534     \textcolor{keywordflow}{if} ( index( trim( nrv ), \textcolor{stringliteral}{'.'}) /= 0 ) \textcolor{keywordflow}{then}
1535       \textcolor{keywordflow}{do} \textcolor{keywordflow}{while} ( index(\textcolor{stringliteral}{'123456789.'}, nrv(len\_trim(nrv):len\_trim(nrv)) ) == 0 )
1536         \textcolor{keywordflow}{if} ( len\_trim(nrv) < 2 ) \textcolor{keywordflow}{exit}
1537         nrv = nrv(1:len\_trim(nrv)-1)
1538 \textcolor{keywordflow}{      end do}
1539 \textcolor{keywordflow}{    end if}
1540 
1541     \textcolor{comment}{!}
1542     \textcolor{comment}{! 指数部を復帰する}
1543     \textcolor{comment}{!}
1544     \textcolor{keywordflow}{if} ( len\_trim(enrv) > 0 ) \textcolor{keywordflow}{then}
1545       nrv = trim(nrv) // enrv
1546 \textcolor{keywordflow}{    end if}
1547 
1548     result = nrv
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_af27310b1b3e5bfd454f243edbdc00f16}\label{namespacedc__string_af27310b1b3e5bfd454f243edbdc00f16}} 
\index{dc\+\_\+string@{dc\+\_\+string}!rtoa\+\_\+array@{rtoa\+\_\+array}}
\index{rtoa\+\_\+array@{rtoa\+\_\+array}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{rtoa\+\_\+array()}{rtoa\_array()}}
{\footnotesize\ttfamily character(string) function dc\+\_\+string\+::rtoa\+\_\+array (\begin{DoxyParamCaption}\item[{real, dimension(\+:), intent(in)}]{rbuf }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 758 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
758     \textcolor{comment}{!}
759     \textcolor{comment}{! 単精度実数型配列 rbuf(:)、で与えられる数値を文字型変数にして返します。}
760     \textcolor{comment}{! 配列が与えられる場合、各要素をカンマと空白「<tt>, </tt>」}
761     \textcolor{comment}{! で区切って返します。}
762     \textcolor{comment}{!}
763     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: rbuf(:)
764     \textcolor{keywordtype}{integer}:: i
765   \textcolor{keywordflow}{continue}
766     \textcolor{keywordflow}{if} (\textcolor{keyword}{size}(rbuf) <= 0) \textcolor{keywordflow}{then}
767       result = \textcolor{stringliteral}{""}
768       \textcolor{keywordflow}{return}
769 \textcolor{keywordflow}{    endif}
770     result = \hyperlink{interfacedc__string_1_1tochar}{tochar}(rbuf(1))
771     \textcolor{keywordflow}{do}, i = 2, \textcolor{keyword}{size}(rbuf)
772       result = trim(result) // \textcolor{stringliteral}{", "} // trim(\hyperlink{interfacedc__string_1_1tochar}{tochar}(rbuf(i)))
773 \textcolor{keywordflow}{    enddo}
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_ae1342d689ceda89ab24ced496cf71df5}\label{namespacedc__string_ae1342d689ceda89ab24ced496cf71df5}} 
\index{dc\+\_\+string@{dc\+\_\+string}!rtoa\+\_\+scalar@{rtoa\+\_\+scalar}}
\index{rtoa\+\_\+scalar@{rtoa\+\_\+scalar}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{rtoa\+\_\+scalar()}{rtoa\_scalar()}}
{\footnotesize\ttfamily character(token) function dc\+\_\+string\+::rtoa\+\_\+scalar (\begin{DoxyParamCaption}\item[{real, intent(in)}]{x }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 731 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
731     \textcolor{comment}{!}
732     \textcolor{comment}{! 単精度実数型変数 x で与えられる数値を文字型変数にして返します。}
733     \textcolor{comment}{! 配列が与えられる場合、各要素をカンマと空白「<tt>, </tt>」}
734     \textcolor{comment}{! で区切って返します。}
735     \textcolor{comment}{!}
736     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: x
737     \textcolor{keywordtype}{character(len = 16)}:: buffer, expbuf
738     \textcolor{keywordtype}{integer}:: ptr, eptr
739   \textcolor{keywordflow}{continue}
740     \textcolor{keyword}{write}(unit=buffer, fmt=\textcolor{stringliteral}{"(g16.8)"}) x
741     eptr = scan(buffer, \textcolor{stringliteral}{"eE"}, back=.true.)
742     expbuf = \textcolor{stringliteral}{''}
743     \textcolor{keywordflow}{if} (eptr > 1) \textcolor{keywordflow}{then}
744       expbuf = buffer(eptr: )
745       buffer(eptr: ) = \textcolor{stringliteral}{" "}
746 \textcolor{keywordflow}{    end if}
747 
748     ptr = verify(buffer, \textcolor{stringliteral}{" 0"}, back=.true.)
749     \textcolor{keywordflow}{if} (ptr > 0) buffer(ptr+1: ) = \textcolor{stringliteral}{" "}
750 
751     \textcolor{keywordflow}{if} (eptr > 1) \textcolor{keywordflow}{then}
752       buffer = buffer(1:len\_trim(buffer)) // expbuf
753 \textcolor{keywordflow}{    end if}
754     result = adjustl(buffer)
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_aec7653322f12260e2e09fbf295db72a5}\label{namespacedc__string_aec7653322f12260e2e09fbf295db72a5}} 
\index{dc\+\_\+string@{dc\+\_\+string}!split\+\_\+cc@{split\+\_\+cc}}
\index{split\+\_\+cc@{split\+\_\+cc}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{split\+\_\+cc()}{split\_cc()}}
{\footnotesize\ttfamily subroutine dc\+\_\+string\+::split\+\_\+cc (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{str,  }\item[{character($\ast$), dimension(\+:), pointer}]{carray,  }\item[{character($\ast$), intent(in)}]{sep,  }\item[{integer, intent(in), optional}]{limit }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1143 of file dc\+\_\+string.\+f90.



References dc\+\_\+types\+::string.


\begin{DoxyCode}
1143     \textcolor{comment}{!}
1144     \textcolor{comment}{! *str* で与えられた文字列を 文字列 *sep* で分解し,}
1145     \textcolor{comment}{! ポインタ配列 *carray* に返します.}
1146     \textcolor{comment}{! *carray* は必ず空状態にして与えてください. 割り付け状態の}
1147     \textcolor{comment}{! 場合にはエラーを返します.}
1148     \textcolor{comment}{!}
1149     \textcolor{comment}{! *limit* に正の数を与えた場合, 最大 *limit* 個のフィールドに分割}
1150     \textcolor{comment}{! します.  負の数や 0 の場合は省略した場合と同じになります.  *str*}
1151     \textcolor{comment}{! の末尾の空白は除去されます.  *sep* に空文字を代入する場合, 空白}
1152     \textcolor{comment}{! 文字で分割されます.}
1153     \textcolor{comment}{!}
1154     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
1155     \textcolor{keywordtype}{implicit none}
1156     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: str
1157     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{pointer}:: carray(:) \textcolor{comment}{!(out)}
1158     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: sep
1159     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: \hyperlink{interfacegtdata__generic_1_1limit}{limit}
1160     \textcolor{keywordtype}{integer} :: num, cur, i, limitnum
1161     \textcolor{keywordtype}{character(STRING)} :: substr
1162     \textcolor{keywordtype}{logical} :: end\_flag
1163   \textcolor{keywordflow}{continue}
1164     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(\hyperlink{interfacegtdata__generic_1_1limit}{limit})) \textcolor{keywordflow}{then}
1165       \textcolor{keywordflow}{if} (\hyperlink{interfacegtdata__generic_1_1limit}{limit} > 0) \textcolor{keywordflow}{then}
1166         limitnum = \hyperlink{interfacegtdata__generic_1_1limit}{limit}
1167       \textcolor{keywordflow}{else}
1168         limitnum = 0
1169 \textcolor{keywordflow}{      end if}
1170     \textcolor{keywordflow}{else}
1171       limitnum = 0
1172 \textcolor{keywordflow}{    end if}
1173 
1174     \textcolor{keywordflow}{if} (len(trim(sep)) == 0) \textcolor{keywordflow}{then}
1175       num = 1
1176       substr = str
1177       \textcolor{comment}{! 重複して無駄だが carray を allocate するため, 何分割するか}
1178       \textcolor{comment}{! 調べ, num に格納する.}
1179       \textcolor{keywordflow}{do}
1180         cur = index(trim(substr), \textcolor{stringliteral}{' '})
1181         \textcolor{keywordflow}{if} (cur == 0) \textcolor{keywordflow}{exit}
1182         num = num + 1
1183         substr = adjustl(substr(cur + len(sep) :len(substr)))
1184 \textcolor{keywordflow}{      end do}
1185 
1186       \textcolor{keywordflow}{if} (limitnum /= 0 .and. num > limitnum) num = limitnum
1187       \textcolor{keyword}{allocate}(carray(num))
1188 
1189       substr = str
1190 \textcolor{keyword}{      end}\_flag = .false.
1191       \textcolor{keywordflow}{do} i = 1, num
1192         cur = index(trim(substr), \textcolor{stringliteral}{' '})
1193         \textcolor{keywordflow}{if} (cur == 0 .or. i == num) end\_flag = .true.
1194         \textcolor{keywordflow}{if} (end\_flag) \textcolor{keywordflow}{then}
1195           carray(i) = substr
1196           \textcolor{keywordflow}{exit}
1197         \textcolor{keywordflow}{else}
1198           carray(i) = substr(1:cur - 1)
1199 \textcolor{keywordflow}{        end if}
1200         substr = adjustl(substr(cur + len(sep) :len(substr)))
1201 \textcolor{keywordflow}{      end do}
1202 
1203     \textcolor{keywordflow}{else}
1204       num = 1
1205       substr = str
1206       \textcolor{comment}{! 重複して無駄だが carray を allocate するため, 何分割するか}
1207       \textcolor{comment}{! 調べ, num に格納する.}
1208       \textcolor{keywordflow}{do}
1209         cur = index(substr, trim(sep))
1210         \textcolor{keywordflow}{if} (cur == 0) \textcolor{keywordflow}{exit}
1211         num = num + 1
1212         substr = substr(cur + len(sep) :len(substr))
1213 \textcolor{keywordflow}{      end do}
1214 
1215       \textcolor{keywordflow}{if} (limitnum /= 0 .and. num > limitnum) num = limitnum
1216       \textcolor{keyword}{allocate}(carray(num))
1217 
1218       substr = str
1219 \textcolor{keyword}{      end}\_flag = .false.
1220       \textcolor{keywordflow}{do} i = 1, num
1221         cur = index(substr, trim(sep))
1222         \textcolor{keywordflow}{if} (cur == 0 .or. i == num) end\_flag = .true.
1223         \textcolor{keywordflow}{if} (end\_flag) \textcolor{keywordflow}{then}
1224           carray(i) = substr
1225           \textcolor{keywordflow}{exit}
1226         \textcolor{keywordflow}{else}
1227           carray(i) = substr(1:cur - 1)
1228 \textcolor{keywordflow}{        end if}
1229         substr = substr(cur + len(sep) :len(substr))
1230 \textcolor{keywordflow}{      end do}
1231 \textcolor{keywordflow}{    end if}
1232 
1233     \textcolor{keywordflow}{return}
1234 
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a5236d631d906becd3be7610031c90d2e}\label{namespacedc__string_a5236d631d906becd3be7610031c90d2e}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str2bool@{str2bool}}
\index{str2bool@{str2bool}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str2bool()}{str2bool()}}
{\footnotesize\ttfamily logical function dc\+\_\+string\+::str2bool (\begin{DoxyParamCaption}\item[{character(len = $\ast$), intent(in)}]{string }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 515 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
515     \textcolor{comment}{!}
516     \textcolor{comment}{! string で与えられる文字型変数を論理型にして返します。 string}
517     \textcolor{comment}{! が空、 または 0、 0.0、 0.0D0、 0.0d0、 .false.、 .FALSE.、 f、}
518     \textcolor{comment}{! F、 false、 FALSE の場合には <tt>.false.</tt> が返ります。}
519     \textcolor{comment}{! それ以外の場合には <tt>.true.</tt> が返ります。}
520     \textcolor{comment}{!}
521     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
522 
523     \textcolor{keywordflow}{continue}
524 
525     \textcolor{keywordflow}{select case}(\hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string})
526     \textcolor{keywordflow}{case} (\textcolor{stringliteral}{""}, \textcolor{stringliteral}{"0"}, \textcolor{stringliteral}{"0.0"}, \textcolor{stringliteral}{"0.0D0"}, \textcolor{stringliteral}{"0.0d0"}, \textcolor{stringliteral}{".false."}, \textcolor{stringliteral}{".FALSE."}, &
527             & \textcolor{stringliteral}{"f"}, \textcolor{stringliteral}{"F"}, \textcolor{stringliteral}{"false"}, \textcolor{stringliteral}{"FALSE"})
528       result = .false.
529 \textcolor{keywordflow}{    case default}
530       result = .true.
531 \textcolor{keywordflow}{    end select}
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a571b6f3c04e2126c4da069aa0a65d90a}\label{namespacedc__string_a571b6f3c04e2126c4da069aa0a65d90a}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str2dp@{str2dp}}
\index{str2dp@{str2dp}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str2dp()}{str2dp()}}
{\footnotesize\ttfamily subroutine dc\+\_\+string\+::str2dp (\begin{DoxyParamCaption}\item[{real(dp), dimension(\+:), pointer}]{real\+\_\+ptr,  }\item[{character(len = $\ast$), intent(in)}]{string\+\_\+in }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 659 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
659     \textcolor{comment}{!}
660     \textcolor{comment}{! string で与えられる文字型変数をカンマ「,」で区切り、}
661     \textcolor{comment}{! 倍精度実数型配列ポインタ real\_ptr(:) にして返します。}
662     \textcolor{comment}{! real\_ptr(:) の配列サイズは string の内容に応じて自動的に決まります。}
663     \textcolor{comment}{!}
664     \textcolor{comment}{! ただし、real\_ptr(:) は必ず空状態または不定状態で与えてください。}
665     \textcolor{comment}{! 既に割り付けられている場合、メモリリークを起こします。}
666     \textcolor{comment}{!}
667     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{pointer}:: real\_ptr(:) \textcolor{comment}{!(out)}
668     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: string\_in
669     \textcolor{keywordtype}{integer}:: i, j, idx, nvalues
670   \textcolor{keywordflow}{continue}
671     nvalues = 1
672     i = 1
673     \textcolor{keywordflow}{do}
674       idx = index(string\_in(i: ), \textcolor{stringliteral}{','})
675       \textcolor{keywordflow}{if} (idx == 0) \textcolor{keywordflow}{exit}
676       i = i + idx - 1 + 1
677       nvalues = nvalues + 1
678 \textcolor{keywordflow}{    enddo}
679     \textcolor{keyword}{allocate}(real\_ptr(nvalues))
680     i = 1
681     j = 1
682     \textcolor{keywordflow}{do}
683       idx = index(string\_in(i: ), \textcolor{stringliteral}{','})
684       \textcolor{keywordflow}{if} (idx == 0) \textcolor{keywordflow}{then}
685         real\_ptr(j) = \hyperlink{interfacedc__string_1_1stod}{stod}(string\_in(i: ))
686         \textcolor{keywordflow}{exit}
687 \textcolor{keywordflow}{      endif}
688       real\_ptr(j) = \hyperlink{interfacedc__string_1_1stod}{stod}(string\_in(i: i+idx-2))
689       i = i + idx - 1 + 1
690       j = j + 1
691 \textcolor{keywordflow}{    enddo}
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_acbb91600d309368d60f4fa9260a20ee5}\label{namespacedc__string_acbb91600d309368d60f4fa9260a20ee5}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str2ip@{str2ip}}
\index{str2ip@{str2ip}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str2ip()}{str2ip()}}
{\footnotesize\ttfamily subroutine dc\+\_\+string\+::str2ip (\begin{DoxyParamCaption}\item[{integer, dimension(\+:), pointer}]{int\+\_\+ptr,  }\item[{character(len = $\ast$), intent(in)}]{string\+\_\+in }\end{DoxyParamCaption})}



Definition at line 587 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
587     \textcolor{comment}{!}
588     \textcolor{comment}{! string で与えられる文字型変数をカンマ「,」で区切り、}
589     \textcolor{comment}{! 整数型配列ポインタ int\_ptr(:) にして返します。 int\_ptr(:)}
590     \textcolor{comment}{! の配列サイズは string の内容に応じて自動的に決まります。}
591     \textcolor{comment}{!}
592     \textcolor{comment}{! ただし、int\_ptr(:) は必ず空状態または不定状態で与えてください。}
593     \textcolor{comment}{! 既に割り付けられている場合、メモリリークを起こします。}
594     \textcolor{comment}{!}
595     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}:: int\_ptr(:) \textcolor{comment}{!(out)}
596     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: string\_in
597     \textcolor{keywordtype}{integer}:: i, j, idx, nvalues
598   \textcolor{keywordflow}{continue}
599     nvalues = 1
600     i = 1
601     \textcolor{keywordflow}{do}
602       idx = index(string\_in(i: ), \textcolor{stringliteral}{','})
603       \textcolor{keywordflow}{if} (idx == 0) \textcolor{keywordflow}{exit}
604       i = i + idx - 1 + 1
605       nvalues = nvalues + 1
606 \textcolor{keywordflow}{    enddo}
607     \textcolor{keyword}{allocate}(int\_ptr(nvalues))
608     i = 1
609     j = 1
610     \textcolor{keywordflow}{do}
611       idx = index(string\_in(i: ), \textcolor{stringliteral}{','})
612       \textcolor{keywordflow}{if} (idx == 0) \textcolor{keywordflow}{then}
613         int\_ptr(j) = \hyperlink{interfacedc__string_1_1stoi}{stoi}(string\_in(i: ))
614         \textcolor{keywordflow}{exit}
615 \textcolor{keywordflow}{      endif}
616       int\_ptr(j) = \hyperlink{interfacedc__string_1_1stod}{stod}(string\_in(i: i+idx-2))
617       i = i + idx - 1 + 1
618       j = j + 1
619 \textcolor{keywordflow}{    enddo}
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_ab4a16c1c3c10504c85befeb3afa33cfa}\label{namespacedc__string_ab4a16c1c3c10504c85befeb3afa33cfa}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str2rp@{str2rp}}
\index{str2rp@{str2rp}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str2rp()}{str2rp()}}
{\footnotesize\ttfamily subroutine dc\+\_\+string\+::str2rp (\begin{DoxyParamCaption}\item[{real, dimension(\+:), pointer}]{real\+\_\+ptr,  }\item[{character(len = $\ast$), intent(in)}]{string\+\_\+in }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 623 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
623     \textcolor{comment}{!}
624     \textcolor{comment}{! string で与えられる文字型変数をカンマ「,」で区切り、}
625     \textcolor{comment}{! 単精度実数型配列ポインタ real\_ptr(:) にして返します。}
626     \textcolor{comment}{! real\_ptr(:) の配列サイズは string の内容に応じて自動的に決まります。}
627     \textcolor{comment}{!}
628     \textcolor{comment}{! ただし、real\_ptr(:) は必ず空状態または不定状態で与えてください。}
629     \textcolor{comment}{! 既に割り付けられている場合、メモリリークを起こします。}
630     \textcolor{comment}{!}
631     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{pointer}:: real\_ptr(:) \textcolor{comment}{!(out)}
632     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: string\_in
633     \textcolor{keywordtype}{integer}:: i, j, idx, nvalues
634   \textcolor{keywordflow}{continue}
635     nvalues = 1
636     i = 1
637     \textcolor{keywordflow}{do}
638       idx = index(string\_in(i: ), \textcolor{stringliteral}{','})
639       \textcolor{keywordflow}{if} (idx == 0) \textcolor{keywordflow}{exit}
640       i = i + idx - 1 + 1
641       nvalues = nvalues + 1
642 \textcolor{keywordflow}{    enddo}
643     \textcolor{keyword}{allocate}(real\_ptr(nvalues))
644     i = 1
645     j = 1
646     \textcolor{keywordflow}{do}
647       idx = index(string\_in(i: ), \textcolor{stringliteral}{','})
648       \textcolor{keywordflow}{if} (idx == 0) \textcolor{keywordflow}{then}
649         real\_ptr(j) = \hyperlink{interfacedc__string_1_1stod}{stod}(string\_in(i: ))
650         \textcolor{keywordflow}{exit}
651 \textcolor{keywordflow}{      endif}
652       real\_ptr(j) = \hyperlink{interfacedc__string_1_1stod}{stod}(string\_in(i: i+idx-2))
653       i = i + idx - 1 + 1
654       j = j + 1
655 \textcolor{keywordflow}{    enddo}
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a3543d3d749bf4eba8a6087d958bf08bf}\label{namespacedc__string_a3543d3d749bf4eba8a6087d958bf08bf}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str\+\_\+include\+\_\+ac@{str\+\_\+include\+\_\+ac}}
\index{str\+\_\+include\+\_\+ac@{str\+\_\+include\+\_\+ac}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str\+\_\+include\+\_\+ac()}{str\_include\_ac()}}
{\footnotesize\ttfamily logical function dc\+\_\+string\+::str\+\_\+include\+\_\+ac (\begin{DoxyParamCaption}\item[{character($\ast$), dimension(\+:), intent(in)}]{carray,  }\item[{character($\ast$), intent(in)}]{string,  }\item[{logical, intent(in), optional}]{ignore\+\_\+space,  }\item[{logical, intent(in), optional}]{ignore\+\_\+case }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 446 of file dc\+\_\+string.\+f90.



References strieq\+\_\+cc().


\begin{DoxyCode}
446     \textcolor{comment}{!}
447     \textcolor{comment}{! 文字型配列引数 *carray* が文字型引数 *string* と等しい要素を持つ場合に}
448     \textcolor{comment}{! .true. を返します.}
449     \textcolor{comment}{!}
450     \textcolor{comment}{! 文字列の前後の空白は無視されます.}
451     \textcolor{comment}{! オプショナル引数 *ignore\_space* に .false. を}
452     \textcolor{comment}{! 与えた場合には文字列先頭の空白を無視しません.}
453     \textcolor{comment}{!}
454     \textcolor{comment}{! オプショナル引数 *ignore\_case* に .true. を与えた場合には}
455     \textcolor{comment}{! 大文字, 小文字の違いを無視して比較します.}
456     \textcolor{comment}{!}
457     \textcolor{comment}{! If an character array argument *carray* has the same}
458     \textcolor{comment}{! as character argument *string*, ".true." is returned.}
459     \textcolor{comment}{!}
460     \textcolor{comment}{! And beginning and trailing spaces are ignored.}
461     \textcolor{comment}{! If ".false." is given to an optional argument *ignore\_space*,}
462     \textcolor{comment}{! beginning spaces are not ignored.}
463     \textcolor{comment}{!}
464     \textcolor{comment}{! If ".true." is given to an optional argument *ignore\_case*,}
465     \textcolor{comment}{! this function ignores case.}
466     \textcolor{comment}{!}
467     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: carray(:)
468     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
469     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: ignore\_space
470     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: ignore\_case
471     \textcolor{keywordtype}{integer}:: array\_size, i
472     \textcolor{keywordtype}{logical}:: ignore\_space\_work, ignore\_case\_work
473 
474     \textcolor{keywordflow}{continue}
475 
476     ignore\_space\_work = .true.
477     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(ignore\_space) ) \textcolor{keywordflow}{then}
478       \textcolor{keywordflow}{if} ( .not. ignore\_space ) \textcolor{keywordflow}{then}
479         ignore\_space\_work = .false.
480 \textcolor{keywordflow}{      end if}
481 \textcolor{keywordflow}{    end if}
482 
483     ignore\_case\_work = .false.
484     \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}(ignore\_case) ) \textcolor{keywordflow}{then}
485       \textcolor{keywordflow}{if} ( ignore\_case ) \textcolor{keywordflow}{then}
486         ignore\_case\_work = .true.
487 \textcolor{keywordflow}{      end if}
488 \textcolor{keywordflow}{    end if}
489 
490     array\_size = \textcolor{keyword}{size}(carray)
491     \textcolor{keywordflow}{do} i = 1, array\_size
492       \textcolor{keywordflow}{if} ( ignore\_space\_work ) \textcolor{keywordflow}{then}
493         \textcolor{keywordflow}{if} ( ignore\_case\_work ) \textcolor{keywordflow}{then}
494           result = &
495             & strieq\_cc( trim( adjustl( carray(i) ) ), &
496             &            trim( adjustl( \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}    ) ) )
497         \textcolor{keywordflow}{else}
498           result = &
499             & ( trim( adjustl( carray(i) ) ) == trim( adjustl( \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string} ) ) )
500 \textcolor{keywordflow}{        end if}
501 
502       \textcolor{keywordflow}{else}
503         \textcolor{keywordflow}{if} ( ignore\_case\_work ) \textcolor{keywordflow}{then}
504           result = &
505             & strieq\_cc( trim( carray(i) ), trim( \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string} ) )
506         \textcolor{keywordflow}{else}
507           result = ( trim(carray(i)) == trim(\hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}) )
508 \textcolor{keywordflow}{        end if}
509 \textcolor{keywordflow}{      end if}
510       \textcolor{keywordflow}{if} (result) \textcolor{keywordflow}{return}
511 \textcolor{keywordflow}{    end do}
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=343pt]{namespacedc__string_a3543d3d749bf4eba8a6087d958bf08bf_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedc__string_a6d092cdef18c7069c65bd7034cd7ac5c}\label{namespacedc__string_a6d092cdef18c7069c65bd7034cd7ac5c}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str\+\_\+to\+\_\+array1@{str\+\_\+to\+\_\+array1}}
\index{str\+\_\+to\+\_\+array1@{str\+\_\+to\+\_\+array1}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str\+\_\+to\+\_\+array1()}{str\_to\_array1()}}
{\footnotesize\ttfamily character(string) function, dimension(1) dc\+\_\+string\+::str\+\_\+to\+\_\+array1 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{c1 }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 917 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
917     \textcolor{comment}{!}
918     \textcolor{comment}{! 異なる長さの複数の文字型変数を 1 つの文字型配列に変換します。}
919     \textcolor{comment}{!}
920     \textcolor{comment}{! 1 から 1 個までの引数を与えることが可能です。}
921     \textcolor{comment}{!}
922     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: c1
923     \textcolor{keywordtype}{character(STRING)} :: result(1)
924 
925   \textcolor{keywordflow}{continue}
926     result(1) = c1
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a105cae402bea4d576aafb55b83b13dde}\label{namespacedc__string_a105cae402bea4d576aafb55b83b13dde}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str\+\_\+to\+\_\+array10@{str\+\_\+to\+\_\+array10}}
\index{str\+\_\+to\+\_\+array10@{str\+\_\+to\+\_\+array10}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str\+\_\+to\+\_\+array10()}{str\_to\_array10()}}
{\footnotesize\ttfamily character(string) function, dimension(10) dc\+\_\+string\+::str\+\_\+to\+\_\+array10 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{c1,  }\item[{character($\ast$), intent(in)}]{c2,  }\item[{character($\ast$), intent(in)}]{c3,  }\item[{character($\ast$), intent(in)}]{c4,  }\item[{character($\ast$), intent(in)}]{c5,  }\item[{character($\ast$), intent(in)}]{c6,  }\item[{character($\ast$), intent(in)}]{c7,  }\item[{character($\ast$), intent(in)}]{c8,  }\item[{character($\ast$), intent(in)}]{c9,  }\item[{character($\ast$), intent(in)}]{c10 }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1070 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
1070     \textcolor{comment}{!}
1071     \textcolor{comment}{! 異なる長さの複数の文字型変数を 1 つの文字型配列に変換します。}
1072     \textcolor{comment}{!}
1073     \textcolor{comment}{! 1 から 10 個までの引数を与えることが可能です。}
1074     \textcolor{comment}{!}
1075     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: c1,c2,c3,c4,c5,c6,c7,c8,c9,c10
1076     \textcolor{keywordtype}{character(STRING)} :: result(10)
1077 
1078   \textcolor{keywordflow}{continue}
1079     result(1) = c1
1080     result(2) = c2
1081     result(3) = c3
1082     result(4) = c4
1083     result(5) = c5
1084     result(6) = c6
1085     result(7) = c7
1086     result(8) = c8
1087     result(9) = c9
1088     result(10) = c10
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a5f7763768ea71bedfefee8b4a335cef1}\label{namespacedc__string_a5f7763768ea71bedfefee8b4a335cef1}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str\+\_\+to\+\_\+array11@{str\+\_\+to\+\_\+array11}}
\index{str\+\_\+to\+\_\+array11@{str\+\_\+to\+\_\+array11}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str\+\_\+to\+\_\+array11()}{str\_to\_array11()}}
{\footnotesize\ttfamily character(string) function, dimension(11) dc\+\_\+string\+::str\+\_\+to\+\_\+array11 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{c1,  }\item[{character($\ast$), intent(in)}]{c2,  }\item[{character($\ast$), intent(in)}]{c3,  }\item[{character($\ast$), intent(in)}]{c4,  }\item[{character($\ast$), intent(in)}]{c5,  }\item[{character($\ast$), intent(in)}]{c6,  }\item[{character($\ast$), intent(in)}]{c7,  }\item[{character($\ast$), intent(in)}]{c8,  }\item[{character($\ast$), intent(in)}]{c9,  }\item[{character($\ast$), intent(in)}]{c10,  }\item[{character($\ast$), intent(in)}]{c11 }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1092 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
1092     \textcolor{comment}{!}
1093     \textcolor{comment}{! 異なる長さの複数の文字型変数を 1 つの文字型配列に変換します。}
1094     \textcolor{comment}{!}
1095     \textcolor{comment}{! 1 から 11 個までの引数を与えることが可能です。}
1096     \textcolor{comment}{!}
1097     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11
1098     \textcolor{keywordtype}{character(STRING)} :: result(11)
1099 
1100   \textcolor{keywordflow}{continue}
1101     result(1) = c1
1102     result(2) = c2
1103     result(3) = c3
1104     result(4) = c4
1105     result(5) = c5
1106     result(6) = c6
1107     result(7) = c7
1108     result(8) = c8
1109     result(9) = c9
1110     result(10) = c10
1111     result(11) = c11
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a15de75053d87bb1bfde250302b326407}\label{namespacedc__string_a15de75053d87bb1bfde250302b326407}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str\+\_\+to\+\_\+array12@{str\+\_\+to\+\_\+array12}}
\index{str\+\_\+to\+\_\+array12@{str\+\_\+to\+\_\+array12}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str\+\_\+to\+\_\+array12()}{str\_to\_array12()}}
{\footnotesize\ttfamily character(string) function, dimension(12) dc\+\_\+string\+::str\+\_\+to\+\_\+array12 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{c1,  }\item[{character($\ast$), intent(in)}]{c2,  }\item[{character($\ast$), intent(in)}]{c3,  }\item[{character($\ast$), intent(in)}]{c4,  }\item[{character($\ast$), intent(in)}]{c5,  }\item[{character($\ast$), intent(in)}]{c6,  }\item[{character($\ast$), intent(in)}]{c7,  }\item[{character($\ast$), intent(in)}]{c8,  }\item[{character($\ast$), intent(in)}]{c9,  }\item[{character($\ast$), intent(in)}]{c10,  }\item[{character($\ast$), intent(in)}]{c11,  }\item[{character($\ast$), intent(in)}]{c12 }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1115 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
1115     \textcolor{comment}{!}
1116     \textcolor{comment}{! 異なる長さの複数の文字型変数を 1 つの文字型配列に変換します。}
1117     \textcolor{comment}{!}
1118     \textcolor{comment}{! 1 から 12 個までの引数を与えることが可能です。}
1119     \textcolor{comment}{!}
1120     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12
1121     \textcolor{keywordtype}{character(STRING)} :: result(12)
1122 
1123   \textcolor{keywordflow}{continue}
1124     result(1) = c1
1125     result(2) = c2
1126     result(3) = c3
1127     result(4) = c4
1128     result(5) = c5
1129     result(6) = c6
1130     result(7) = c7
1131     result(8) = c8
1132     result(9) = c9
1133     result(10) = c10
1134     result(11) = c11
1135     result(12) = c12
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a8436219baa185e142dd5e926afc492d4}\label{namespacedc__string_a8436219baa185e142dd5e926afc492d4}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str\+\_\+to\+\_\+array2@{str\+\_\+to\+\_\+array2}}
\index{str\+\_\+to\+\_\+array2@{str\+\_\+to\+\_\+array2}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str\+\_\+to\+\_\+array2()}{str\_to\_array2()}}
{\footnotesize\ttfamily character(string) function, dimension(2) dc\+\_\+string\+::str\+\_\+to\+\_\+array2 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{c1,  }\item[{character($\ast$), intent(in)}]{c2 }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 930 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
930     \textcolor{comment}{!}
931     \textcolor{comment}{! 異なる長さの複数の文字型変数を 1 つの文字型配列に変換します。}
932     \textcolor{comment}{!}
933     \textcolor{comment}{! 1 から 2 個までの引数を与えることが可能です。}
934     \textcolor{comment}{!}
935     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: c1,c2
936     \textcolor{keywordtype}{character(STRING)} :: result(2)
937 
938   \textcolor{keywordflow}{continue}
939     result(1) = c1
940     result(2) = c2
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a9663dca299a03c4bc899d54664151bdd}\label{namespacedc__string_a9663dca299a03c4bc899d54664151bdd}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str\+\_\+to\+\_\+array3@{str\+\_\+to\+\_\+array3}}
\index{str\+\_\+to\+\_\+array3@{str\+\_\+to\+\_\+array3}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str\+\_\+to\+\_\+array3()}{str\_to\_array3()}}
{\footnotesize\ttfamily character(string) function, dimension(3) dc\+\_\+string\+::str\+\_\+to\+\_\+array3 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{c1,  }\item[{character($\ast$), intent(in)}]{c2,  }\item[{character($\ast$), intent(in)}]{c3 }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 944 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
944     \textcolor{comment}{!}
945     \textcolor{comment}{! 異なる長さの複数の文字型変数を 1 つの文字型配列に変換します。}
946     \textcolor{comment}{!}
947     \textcolor{comment}{! 1 から 3 個までの引数を与えることが可能です。}
948     \textcolor{comment}{!}
949     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: c1,c2,c3
950     \textcolor{keywordtype}{character(STRING)} :: result(3)
951 
952   \textcolor{keywordflow}{continue}
953     result(1) = c1
954     result(2) = c2
955     result(3) = c3
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_ad3f263a78a169110e0a898f063cae6f4}\label{namespacedc__string_ad3f263a78a169110e0a898f063cae6f4}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str\+\_\+to\+\_\+array4@{str\+\_\+to\+\_\+array4}}
\index{str\+\_\+to\+\_\+array4@{str\+\_\+to\+\_\+array4}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str\+\_\+to\+\_\+array4()}{str\_to\_array4()}}
{\footnotesize\ttfamily character(string) function, dimension(4) dc\+\_\+string\+::str\+\_\+to\+\_\+array4 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{c1,  }\item[{character($\ast$), intent(in)}]{c2,  }\item[{character($\ast$), intent(in)}]{c3,  }\item[{character($\ast$), intent(in)}]{c4 }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 959 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
959     \textcolor{comment}{!}
960     \textcolor{comment}{! 異なる長さの複数の文字型変数を 1 つの文字型配列に変換します。}
961     \textcolor{comment}{!}
962     \textcolor{comment}{! 1 から 4 個までの引数を与えることが可能です。}
963     \textcolor{comment}{!}
964     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: c1,c2,c3,c4
965     \textcolor{keywordtype}{character(STRING)} :: result(4)
966 
967   \textcolor{keywordflow}{continue}
968     result(1) = c1
969     result(2) = c2
970     result(3) = c3
971     result(4) = c4
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a55637917189e0aeeff7d1188b00124a5}\label{namespacedc__string_a55637917189e0aeeff7d1188b00124a5}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str\+\_\+to\+\_\+array5@{str\+\_\+to\+\_\+array5}}
\index{str\+\_\+to\+\_\+array5@{str\+\_\+to\+\_\+array5}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str\+\_\+to\+\_\+array5()}{str\_to\_array5()}}
{\footnotesize\ttfamily character(string) function, dimension(5) dc\+\_\+string\+::str\+\_\+to\+\_\+array5 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{c1,  }\item[{character($\ast$), intent(in)}]{c2,  }\item[{character($\ast$), intent(in)}]{c3,  }\item[{character($\ast$), intent(in)}]{c4,  }\item[{character($\ast$), intent(in)}]{c5 }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 975 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
975     \textcolor{comment}{!}
976     \textcolor{comment}{! 異なる長さの複数の文字型変数を 1 つの文字型配列に変換します。}
977     \textcolor{comment}{!}
978     \textcolor{comment}{! 1 から 5 個までの引数を与えることが可能です。}
979     \textcolor{comment}{!}
980     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: c1,c2,c3,c4,c5
981     \textcolor{keywordtype}{character(STRING)} :: result(5)
982 
983   \textcolor{keywordflow}{continue}
984     result(1) = c1
985     result(2) = c2
986     result(3) = c3
987     result(4) = c4
988     result(5) = c5
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a97a51095f7c7c2774101561a4e3c3bda}\label{namespacedc__string_a97a51095f7c7c2774101561a4e3c3bda}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str\+\_\+to\+\_\+array6@{str\+\_\+to\+\_\+array6}}
\index{str\+\_\+to\+\_\+array6@{str\+\_\+to\+\_\+array6}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str\+\_\+to\+\_\+array6()}{str\_to\_array6()}}
{\footnotesize\ttfamily character(string) function, dimension(6) dc\+\_\+string\+::str\+\_\+to\+\_\+array6 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{c1,  }\item[{character($\ast$), intent(in)}]{c2,  }\item[{character($\ast$), intent(in)}]{c3,  }\item[{character($\ast$), intent(in)}]{c4,  }\item[{character($\ast$), intent(in)}]{c5,  }\item[{character($\ast$), intent(in)}]{c6 }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 992 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
992     \textcolor{comment}{!}
993     \textcolor{comment}{! 異なる長さの複数の文字型変数を 1 つの文字型配列に変換します。}
994     \textcolor{comment}{!}
995     \textcolor{comment}{! 1 から 6 個までの引数を与えることが可能です。}
996     \textcolor{comment}{!}
997     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: c1,c2,c3,c4,c5,c6
998     \textcolor{keywordtype}{character(STRING)} :: result(6)
999 
1000   \textcolor{keywordflow}{continue}
1001     result(1) = c1
1002     result(2) = c2
1003     result(3) = c3
1004     result(4) = c4
1005     result(5) = c5
1006     result(6) = c6
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a76fdd961b37635d45041f87069c72229}\label{namespacedc__string_a76fdd961b37635d45041f87069c72229}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str\+\_\+to\+\_\+array7@{str\+\_\+to\+\_\+array7}}
\index{str\+\_\+to\+\_\+array7@{str\+\_\+to\+\_\+array7}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str\+\_\+to\+\_\+array7()}{str\_to\_array7()}}
{\footnotesize\ttfamily character(string) function, dimension(7) dc\+\_\+string\+::str\+\_\+to\+\_\+array7 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{c1,  }\item[{character($\ast$), intent(in)}]{c2,  }\item[{character($\ast$), intent(in)}]{c3,  }\item[{character($\ast$), intent(in)}]{c4,  }\item[{character($\ast$), intent(in)}]{c5,  }\item[{character($\ast$), intent(in)}]{c6,  }\item[{character($\ast$), intent(in)}]{c7 }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1010 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
1010     \textcolor{comment}{!}
1011     \textcolor{comment}{! 異なる長さの複数の文字型変数を 1 つの文字型配列に変換します。}
1012     \textcolor{comment}{!}
1013     \textcolor{comment}{! 1 から 7 個までの引数を与えることが可能です。}
1014     \textcolor{comment}{!}
1015     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: c1,c2,c3,c4,c5,c6,c7
1016     \textcolor{keywordtype}{character(STRING)} :: result(7)
1017 
1018   \textcolor{keywordflow}{continue}
1019     result(1) = c1
1020     result(2) = c2
1021     result(3) = c3
1022     result(4) = c4
1023     result(5) = c5
1024     result(6) = c6
1025     result(7) = c7
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a0a3f693afdfeb90ad3904875f7d1e1ec}\label{namespacedc__string_a0a3f693afdfeb90ad3904875f7d1e1ec}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str\+\_\+to\+\_\+array8@{str\+\_\+to\+\_\+array8}}
\index{str\+\_\+to\+\_\+array8@{str\+\_\+to\+\_\+array8}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str\+\_\+to\+\_\+array8()}{str\_to\_array8()}}
{\footnotesize\ttfamily character(string) function, dimension(8) dc\+\_\+string\+::str\+\_\+to\+\_\+array8 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{c1,  }\item[{character($\ast$), intent(in)}]{c2,  }\item[{character($\ast$), intent(in)}]{c3,  }\item[{character($\ast$), intent(in)}]{c4,  }\item[{character($\ast$), intent(in)}]{c5,  }\item[{character($\ast$), intent(in)}]{c6,  }\item[{character($\ast$), intent(in)}]{c7,  }\item[{character($\ast$), intent(in)}]{c8 }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1029 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
1029     \textcolor{comment}{!}
1030     \textcolor{comment}{! 異なる長さの複数の文字型変数を 1 つの文字型配列に変換します。}
1031     \textcolor{comment}{!}
1032     \textcolor{comment}{! 1 から 8 個までの引数を与えることが可能です。}
1033     \textcolor{comment}{!}
1034     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: c1,c2,c3,c4,c5,c6,c7,c8
1035     \textcolor{keywordtype}{character(STRING)} :: result(8)
1036 
1037   \textcolor{keywordflow}{continue}
1038     result(1) = c1
1039     result(2) = c2
1040     result(3) = c3
1041     result(4) = c4
1042     result(5) = c5
1043     result(6) = c6
1044     result(7) = c7
1045     result(8) = c8
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_ae9bf4040729d42eae02a60ec69f7879a}\label{namespacedc__string_ae9bf4040729d42eae02a60ec69f7879a}} 
\index{dc\+\_\+string@{dc\+\_\+string}!str\+\_\+to\+\_\+array9@{str\+\_\+to\+\_\+array9}}
\index{str\+\_\+to\+\_\+array9@{str\+\_\+to\+\_\+array9}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{str\+\_\+to\+\_\+array9()}{str\_to\_array9()}}
{\footnotesize\ttfamily character(string) function, dimension(9) dc\+\_\+string\+::str\+\_\+to\+\_\+array9 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{c1,  }\item[{character($\ast$), intent(in)}]{c2,  }\item[{character($\ast$), intent(in)}]{c3,  }\item[{character($\ast$), intent(in)}]{c4,  }\item[{character($\ast$), intent(in)}]{c5,  }\item[{character($\ast$), intent(in)}]{c6,  }\item[{character($\ast$), intent(in)}]{c7,  }\item[{character($\ast$), intent(in)}]{c8,  }\item[{character($\ast$), intent(in)}]{c9 }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1049 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
1049     \textcolor{comment}{!}
1050     \textcolor{comment}{! 異なる長さの複数の文字型変数を 1 つの文字型配列に変換します。}
1051     \textcolor{comment}{!}
1052     \textcolor{comment}{! 1 から 9 個までの引数を与えることが可能です。}
1053     \textcolor{comment}{!}
1054     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: c1,c2,c3,c4,c5,c6,c7,c8,c9
1055     \textcolor{keywordtype}{character(STRING)} :: result(9)
1056 
1057   \textcolor{keywordflow}{continue}
1058     result(1) = c1
1059     result(2) = c2
1060     result(3) = c3
1061     result(4) = c4
1062     result(5) = c5
1063     result(6) = c6
1064     result(7) = c7
1065     result(8) = c8
1066     result(9) = c9
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_a39f333ec46e3653c1909ea2f9f805398}\label{namespacedc__string_a39f333ec46e3653c1909ea2f9f805398}} 
\index{dc\+\_\+string@{dc\+\_\+string}!strhead\+\_\+cc@{strhead\+\_\+cc}}
\index{strhead\+\_\+cc@{strhead\+\_\+cc}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{strhead\+\_\+cc()}{strhead\_cc()}}
{\footnotesize\ttfamily logical function dc\+\_\+string\+::strhead\+\_\+cc (\begin{DoxyParamCaption}\item[{character(len = $\ast$), intent(in)}]{whole,  }\item[{character(len = $\ast$), intent(in)}]{head }\end{DoxyParamCaption})}



Definition at line 402 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
402     \textcolor{comment}{!}
403     \textcolor{comment}{! 文字列 head と文字列 whole の先頭部分 (head と同じ文字列長)}
404     \textcolor{comment}{! とを比較し、同じものならば .true. を、異なる場合には .false.}
405     \textcolor{comment}{! を返します。 whole の文字列長が head の文字列長よりも短い場合には}
406     \textcolor{comment}{! .false. を返します。}
407     \textcolor{comment}{!}
408     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: whole
409     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: head
410 
411     \textcolor{keywordflow}{continue}
412 
413     result = (len(whole) >= len(head))
414     \textcolor{keywordflow}{if} (.not. result) \textcolor{keywordflow}{return}
415     result = (whole(1:len(head)) == head)
416 
\end{DoxyCode}
\mbox{\Hypertarget{namespacedc__string_ace046e81a387055ae01389766e76b980}\label{namespacedc__string_ace046e81a387055ae01389766e76b980}} 
\index{dc\+\_\+string@{dc\+\_\+string}!strieq\+\_\+cc@{strieq\+\_\+cc}}
\index{strieq\+\_\+cc@{strieq\+\_\+cc}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{strieq\+\_\+cc()}{strieq\_cc()}}
{\footnotesize\ttfamily logical function dc\+\_\+string\+::strieq\+\_\+cc (\begin{DoxyParamCaption}\item[{character(len = $\ast$), intent(in)}]{string\+\_\+a,  }\item[{character(len = $\ast$), intent(in)}]{string\+\_\+b }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 420 of file dc\+\_\+string.\+f90.



Referenced by str\+\_\+include\+\_\+ac().


\begin{DoxyCode}
420     \textcolor{comment}{!}
421     \textcolor{comment}{! 大文字・小文字を無視して文字列の比較を行います。}
422     \textcolor{comment}{! 文字列 string\_a と文字列 string\_b を比較し、同じものならば}
423     \textcolor{comment}{! .true. を、異なる場合には .false. を返します。}
424     \textcolor{comment}{!}
425     \textcolor{comment}{!--}
426     \textcolor{comment}{! ※ 注意書き ※}
427     \textcolor{comment}{!}
428     \textcolor{comment}{! コンパイラによっては character(len = len(string\_a)):: abuf}
429     \textcolor{comment}{! が通らないため, 文字数を dc\_types で提供される種別型}
430     \textcolor{comment}{! パラメタ STRING で制限}
431     \textcolor{comment}{!++}
432     \textcolor{comment}{!}
433     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: string\_a
434     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: string\_b
435     \textcolor{keywordtype}{character(len = STRING)}:: abuf
436     \textcolor{keywordtype}{character(len = STRING)}:: bbuf
437     abuf = string\_a
438     bbuf = string\_b
439     \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1toupper}{toupper}(abuf)
440     \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1toupper}{toupper}(bbuf)
441     result = (abuf == bbuf)
\end{DoxyCode}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=343pt]{namespacedc__string_ace046e81a387055ae01389766e76b980_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedc__string_ab860a24280cb12470c2809f3fa9a5195}\label{namespacedc__string_ab860a24280cb12470c2809f3fa9a5195}} 
\index{dc\+\_\+string@{dc\+\_\+string}!uchar@{uchar}}
\index{uchar@{uchar}!dc\+\_\+string@{dc\+\_\+string}}
\subsubsection{\texorpdfstring{uchar()}{uchar()}}
{\footnotesize\ttfamily character(string) function, public \hyperlink{interfacedc__string_1_1uchar}{dc\+\_\+string\+::uchar} (\begin{DoxyParamCaption}\item[{character(len = $\ast$), intent(in)}]{ch }\end{DoxyParamCaption})}



Definition at line 1386 of file dc\+\_\+string.\+f90.


\begin{DoxyCode}
1386     \textcolor{comment}{!}
1387     \textcolor{comment}{! 文字列 ch に英字が含まれる場合、その英字を大文字に変換して返します。}
1388     \textcolor{comment}{! 英字でない文字や既に大文字になっている文字はそのまま返します。}
1389     \textcolor{comment}{!}
1390     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: ch
1391   \textcolor{keywordflow}{continue}
1392     result = ch
1393     \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1toupper}{toupper}(result)
\end{DoxyCode}
