Print this page
2964 need POSIX 2008 locale object support
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Approved by: TBD
   1 '\" te

   2 .\"  Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
   3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6 .TH TOUPPER 3C "Aug 14, 2002"
   7 .SH NAME
   8 toupper \- transliterate lower-case characters to upper-case
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 #include <ctype.h>
  13 
  14 \fBint\fR \fBtoupper\fR(\fBint\fR \fIc\fR);
  15 .fi




  16 
  17 .SH DESCRIPTION
  18 .sp
  19 .LP
  20 The \fBtoupper()\fR function has as a domain a type \fBint\fR, the value of
  21 which is representable as an \fBunsigned char\fR or the value of \fBEOF\fR. If
  22 the argument has any other value, the argument is returned unchanged. If the
  23 argument of \fBtoupper()\fR represents a lower-case letter, and there exists a
  24 corresponding upper-case letter (as defined by character type information in
  25 the program locale category \fBLC_CTYPE\fR),   the result is the corresponding
  26 upper-case letter. All other arguments in the domain are returned unchanged.




  27 .SH RETURN VALUES
  28 .sp
  29 .LP
  30 On successful completion, \fBtoupper()\fR returns the upper-case letter
  31 corresponding to the argument passed.
  32 .SH ERRORS
  33 .sp
  34 .LP
  35 No errors are defined.
  36 .SH ATTRIBUTES
  37 .sp
  38 .LP
  39 See \fBattributes\fR(5) for descriptions of the following attributes:
  40 .sp
  41 
  42 .sp
  43 .TS
  44 box;
  45 c | c
  46 l | l .
  47 ATTRIBUTE TYPE  ATTRIBUTE VALUE
  48 _
  49 CSI     Enabled
  50 _
  51 Interface Stability     Standard
  52 _
  53 MT-Level        MT-Safe
  54 .TE
  55 
  56 .SH SEE ALSO
  57 .sp
  58 .LP
  59 \fB_toupper\fR(3C), \fBsetlocale\fR(3C), \fBattributes\fR(5),
  60 \fBstandards\fR(5)

   1 '\" te
   2 .\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
   3 .\"  Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
   4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   7 .TH TOUPPER 3C "Jun 21, 2014"
   8 .SH NAME
   9 toupper, toupper_l \- transliterate lower-case characters to upper-case
  10 .SH SYNOPSIS
  11 .LP
  12 .nf
  13 #include <ctype.h>
  14 
  15 \fBint\fR \fBtoupper\fR(\fBint\fR \fIc\fR);
  16 .fi
  17 .LP
  18 .nf
  19 \fBint\fR \fBtoupper_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIloc\fR);
  20 .fi
  21 
  22 .SH DESCRIPTION

  23 .LP
  24 The \fBtoupper()\fR function has as a domain a type \fBint\fR, the value of
  25 which is representable as an \fBunsigned char\fR or the value of \fBEOF\fR. If
  26 the argument has any other value, the argument is returned unchanged. If the
  27 argument of \fBtoupper()\fR represents a lower-case letter, and there exists a
  28 corresponding upper-case letter (as defined by character type information in
  29 the locale category \fBLC_CTYPE\fR),   the result is the corresponding
  30 upper-case letter. All other arguments in the domain are returned unchanged.
  31 .LP
  32 The function \fBtoupper_l()\fR behaves identically to \fBtoupper()\fR, except
  33 instead of operating in the current locale, it operates in the locale
  34 specified by \fIloc\fR.
  35 .SH RETURN VALUES

  36 .LP
  37 On successful completion, \fBtoupper()\fR returns the upper-case letter
  38 corresponding to the argument passed.
  39 .SH ERRORS

  40 .LP
  41 No errors are defined.
  42 .SH ATTRIBUTES

  43 .LP
  44 See \fBattributes\fR(5) for descriptions of the following attributes:



  45 .TS
  46 box;
  47 c | c
  48 l | l .
  49 ATTRIBUTE TYPE  ATTRIBUTE VALUE
  50 _
  51 CSI     Enabled
  52 _
  53 Interface Stability     Standard
  54 _
  55 MT-Level        MT-Safe
  56 .TE
  57 
  58 .SH SEE ALSO

  59 .LP
  60 \fB_toupper\fR(3C), \fBnewlocale\fR(3C), \fBsetlocale\fR(3C),
  61 \fBuselocale\fR(3C),
  62 \fBattributes\fR(5), \fBstandards\fR(5)