SDDSlib
Loading...
Searching...
No Matches
str_toupper.c
Go to the documentation of this file.
1/**
2 * @file str_toupper.c
3 * @brief Implementation of the str_toupper function.
4 *
5 * @copyright
6 * - (c) 2002 The University of Chicago, as Operator of Argonne National Laboratory.
7 * - (c) 2002 The Regents of the University of California, as Operator of Los Alamos National Laboratory.
8 *
9 * @license
10 * This file is distributed under the terms of the Software License Agreement
11 * found in the file LICENSE included with this distribution.
12 *
13 * @author M. Borland, C. Saunders, R. Soliday
14 */
15
16#include "mdb.h"
17#include <ctype.h>
18
19/**
20 * @brief Convert a string to upper case.
21 *
22 * This function takes a string and converts all its characters to upper case.
23 *
24 * @param s The string to convert.
25 * @return The converted string.
26 */
27char *str_toupper(s) char *s;
28{
29 register char *ptr;
30
31 ptr = s;
32 while (*ptr) {
33 *ptr = toupper(*ptr);
34 ptr++;
35 }
36 return (s);
37}
char * str_toupper(char *s)
Convert a string to upper case.
Definition str_toupper.c:27