Convert bytes {<spanclass="parameter">str</span>, <spanclass="parameter">strsize</span>} in the given <spanclass="parameter">base</span> to limbs at <spanclass="parameter">rp</span>.
</pre></div></div></div><scripttype="text/javascript">AddLanguageTabSet("ID0EDCA");</script><h4class="subHeading">Parameters</h4><dl><dt><spanclass="parameter">rp</span></dt><dd>Type:<ahref="4609ac5e-5cf9-cd20-2fa9-8040101c165c.htm">Math.Gmp.Native<spanid="LSTF9A8C1A6_1"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF9A8C1A6_1?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mp_ptr</a><br/>The result integer.</dd><dt><spanclass="parameter">str</span></dt><dd>Type:<ahref="06249483-9daf-95f9-32c7-30195550bbcc.htm">Math.Gmp.Native<spanid="LSTF9A8C1A6_2"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF9A8C1A6_2?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>char_ptr</a><br/>The operand string.</dd><dt><spanclass="parameter">strsize</span></dt><dd>Type:<ahref="d9761bfb-1882-59d2-e89b-c6460141f9a6.htm">Math.Gmp.Native<spanid="LSTF9A8C1A6_3"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF9A8C1A6_3?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>size_t</a><br/>The length of <spanclass="parameter">str</span>.</dd><dt><spanclass="parameter">base</span></dt><dd>Type:<ahref="http://msdn2.microsoft.com/en-us/library/td2s409d"target="_blank">System<spanid="LSTF9A8C1A6_4"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF9A8C1A6_4?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>Int32</a><br/></dd></dl><h4class="subHeading">Return Value</h4>Type:<ahref="4b58a584-7a0e-b600-18fa-ebd493861eb3.htm">mp_size_t</a><br/>The number of limbs of <spanclass="parameter">rp</span>.</div><divclass="collapsibleAreaRegion"><spanclass="collapsibleRegionTitle"onclick="SectionExpandCollapse('ID2RB')"onkeypress="SectionExpandCollapse_CheckKey('ID2RB', event)"tabindex="0"><imgid="ID2RBToggle"class="collapseToggle"src="../icons/SectionExpanded.png"/>Remarks</span></div><divid="ID2RBSection"class="collapsibleSection"><p><spanclass="code"><spanclass="parameter">str</span>[0]</span> is the most significant input byte and
<spanclass="code"><spanclass="parameter">str</span>[<spanclass="parameter">strsize</span> - 1]</span> is the least significant input byte.
Each byte should be a value in the range <spanclass="code">0</span> to <spanclass="code"><spanclass="parameter">base</span> - 1</span>,
not an ASCII character. base can vary from <spanclass="code">2</span> to <spanclass="code">256</span>.
</p><p>
The converted value is {<spanclass="parameter">rp</span>, rn} where <spanclass="code">rn</span> is the return value.
If the most significant input byte <spanclass="code"><spanclass="parameter">str</span>[0]</span> is non-zero,
then <spanclass="code"><spanclass="parameter">rp</span>[rn - 1]</span> will be non-zero,
else <spanclass="code"><spanclass="parameter">rp</span>[rn - 1]</span> and some number of subsequent limbs may be zero.
</p><p>
The area at <spanclass="parameter">rp</span> has to have space for the largest possible number with
<spanclass="parameter">strsize</span> digits in the chosen <spanclass="parameter">base</span>, plus one extra limb.
</p><p>
The input must have at least one byte, and no overlap is permitted
between {<spanclass="parameter">str</span>, <spanclass="parameter">strsize</span>} and the result at <spanclass="parameter">rp</span>.
mp_ptr rp = <spanclass="highlight-keyword">new</span> mp_ptr(<spanclass="highlight-keyword">new</span><spanclass="highlight-keyword">uint</span>[<spanclass="highlight-number">2</span>]);
gmp_lib.free(str)</pre></div><divid="ID0EDAABA_code_Div3"class="codeSnippetContainerCode"style="display: none"><p>No code example is currently available or this language may not be supported.</p></div><divid="ID0EDAABA_code_Div4"class="codeSnippetContainerCode"style="display: none"><p>No code example is currently available or this language may not be supported.</p></div></div></div><scripttype="text/javascript">AddLanguageTabSet("ID0EDAABA");</script></div><divclass="collapsibleAreaRegion"id="seeAlsoSection"><spanclass="collapsibleRegionTitle"onclick="SectionExpandCollapse('ID4RB')"onkeypress="SectionExpandCollapse_CheckKey('ID4RB', event)"tabindex="0"><imgid="ID4RBToggle"class="collapseToggle"src="../icons/SectionExpanded.png"/>See Also</span></div><divid="ID4RBSection"class="collapsibleSection"><h4class="subHeading">Reference</h4><divclass="seeAlsoStyle"><ahref="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm">gmp_lib Class</a></div><divclass="seeAlsoStyle"><ahref="d9c51b9f-0c54-770b-28ea-6eebd8fef368.htm">Math.Gmp.Native Namespace</a></div><divclass="seeAlsoStyle"><ahref="1e9cacd7-32b3-7f3b-659a-efdb3e064092.htm">gmp_lib<spanid="LSTF9A8C1A6_5"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF9A8C1A6_5?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mpn_get_str(char_ptr, Int32, mp_ptr, mp_size_t)</a></div><divclass="seeAlsoStyle"><ahref="fb2d29b4-f7e2-e3d6-6fcb-920f2e86c0d7.htm">gmp_lib<spanid="LSTF9A8C1A6_6"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTF9A8C1A6_6?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mpn_sizeinbase(mp_ptr, mp_size_t, Int32)</a></div><divclass="seeAlsoStyle"><ahref="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm"><ahref="https://gmplib.org/manual/Low_002dlevel-Functions.html#Low_002dlevel-Functions">GNU MP - Low-level Functions</a></a></div></div></div></div><divid="pageFooter"class="pageFooter"></div></body></html>