"함수 uppercase()"의 두 판 사이의 차이

잔글 (Jmnote 사용자가 함수 uppercase 문서를 함수 uppercase() 문서로 옮겼습니다)
126번째 줄: 126번째 줄:


==같이 보기==
==같이 보기==
*[[lowercase]]
*[[함수 lowercase()]]
*[[capitalize]]
*[[함수 capitalize()]]
*[[SQL 함수]]
*[[SQL 함수]]


==References==
==References==
*http://eqcode.com/wiki/uppercase
*http://eqcode.com/wiki/uppercase

2015년 4월 12일 (일) 14:55 판

1 개요

uc
upcase
upper
uppercase
uppercaseString
strtoupper
toupper
toUpperCase

2 Bash

Bash
Copy
echo "Hello, World" | tr 'a-z' 'A-Z' 
# HELLO, WORLD

3 C

C
Copy
#include <ctype.h>
#include <stdio.h>
int main(void) {
    char string[] = "Wiki means fast?";
    int i;
    for (i = 0; i < sizeof(string); ++i) {
        /* transform characters in place, one by one */ 
        string[i] = toupper(string[i]);
    }
    puts(string);                       /* "WIKI MEANS FAST?" */
    return 0;
}

4 C#

C#
Copy
"Wiki means fast?".ToUpper();        // "WIKI MEANS FAST?"

5 Excel

PHP
Copy
=UPPER("Hello")
// HELLO

6 Java

Java
Copy
String str = "Hello World!";
System.out.println(str.toUpperCase());

7 JavaScript

JavaScript
Copy
var str = "Hello World!";
document.write(str.toUpperCase());

8 Objective-C

Objective-C
Copy
NSString *str = @"Hello World!";
NSLog(@"%@", [str uppercaseString];

9 Perl

Perl
Copy
$str = "Hello World!";
print uc($str);

10 PHP

PHP
Copy
$str = "Hello World!";
echo strtoupper($str);

11 Python

Python
Copy
str = "Hello World!"
print str.upper()

12 Ruby

Ruby
Copy
str = "Hello World!"
str2 = str.upcase
puts str2
Ruby
Copy
str = "Hello World!"
str.upcase!
puts str

13 Scheme

scheme
Copy
(use-modules (srfi srfi-13))
(string-upcase "Wiki means fast?") ;  "WIKI MEANS FAST?"

14 SQL

14.1 MySQL

sql
Copy
SELECT UPPER( "Hello World" );
-- HELLO WORLD

14.2 Oracle

sql
Copy
SELECT UPPER('Hello World') FROM DUAL;
-- HELLO WORLD

15 같이 보기

16 References