[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  STOI

  .  Summary

  stoi(str <s>);

  .  Description

  The stoi function assumes that <s> is a string which contains an in-
  teger number, written out. It processes the string digit by digit
  and returns that value. For example, stoi("123") would return the
  integer value 123. Processing stops at the first non-digit charac-
  ter. If an empty or invalid string is parsed, a value of 0 is re-
  turned.

  .  Return Value

  An integer value as described above.

  .  Example

  str s[] = "123";
  if (stoi(s) == 123)
   prints("This will always be printed!");

See Also: itos
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson