Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/stdlib/strtoul.3
Show All 25 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" @(#)strtoul.3 8.1 (Berkeley) 6/4/93 | .\" @(#)strtoul.3 8.1 (Berkeley) 6/4/93 | ||||
.\" | .\" | ||||
.Dd November 28, 2001 | .Dd August 21, 2023 | ||||
.Dt STRTOUL 3 | .Dt STRTOUL 3 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm strtoul , strtoull , strtoumax , strtouq | .Nm strtoul , strtoull , strtoumax , strtouq | ||||
.Nd "convert a string to an" | .Nd "convert a string to an" | ||||
.Vt "unsigned long" , "unsigned long long" , uintmax_t , | .Vt "unsigned long" , "unsigned long long" , uintmax_t , | ||||
or | or | ||||
.Vt u_quad_t | .Vt u_quad_t | ||||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
.Ql + | .Ql + | ||||
or | or | ||||
.Ql - | .Ql - | ||||
sign. | sign. | ||||
If | If | ||||
.Fa base | .Fa base | ||||
is zero or 16, | is zero or 16, | ||||
the string may then include a | the string may then include a | ||||
.Dq Li 0b | |||||
prefix, and the number will be read in base 2; or it may include a | |||||
.Dq Li 0x | .Dq Li 0x | ||||
prefix, | prefix, | ||||
and the number will be read in base 16; otherwise, a zero | and the number will be read in base 16; otherwise, a zero | ||||
.Fa base | .Fa base | ||||
is taken as 10 (decimal) unless the next character is | is taken as 10 (decimal) unless the next character is | ||||
.Ql 0 , | .Ql 0 , | ||||
in which case it is taken as 8 (octal). | in which case it is taken as 8 (octal). | ||||
.Pp | .Pp | ||||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |