[#bsl-stoi-08]
= xref:bsl.adoc[bsl]::stoi
:relfileprefix: ../
:mrdocs:

`stoi` overloads

== Synopses

Declared in `&lt;bslstl&lowbar;string&period;h&gt;`

Parse the specified `str` as a signed integer&semi; see `stol` for details&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:bsl/stoi-0c.adoc[stoi](
    xref:bsl/string.adoc[string] const& str,
    std::size&lowbar;t* pos = 0,
    int base = 10);
----

[.small]#xref:bsl/stoi-0c.adoc[_» more&period;&period;&period;_]#

Same as `stoi` for `wstring`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:bsl/stoi-00.adoc[stoi](
    xref:bsl/wstring.adoc[wstring] const& str,
    std::size&lowbar;t* pos = 0,
    int base = 10);
----

[.small]#xref:bsl/stoi-00.adoc[_» more&period;&period;&period;_]#

== Return Value

`int` value parsed from `str`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *str*
| string to parse
| *pos*
| optional output for the index after the parsed value
| *base*
| numeric base for parsing (0 or 2&period;&period;36)
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
