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

107번째 줄: 107번째 줄:
(use-modules (srfi srfi-13))
(use-modules (srfi srfi-13))
(string-upcase "Wiki means fast?") ;  "WIKI MEANS FAST?"
(string-upcase "Wiki means fast?") ;  "WIKI MEANS FAST?"
</source>
==Windows Batch==
<source lang='batch'>
@echo off
setlocal
set str2=
set "str=Hello World!"
for /f "skip=2 delims=" %%I in ('tree "\%str%"') do if not defined str2 set "str2=%%~I"
set "str2=%str2:~3%"
echo %str2%
</source>
</source>



2018년 1월 17일 (수) 15:14 판

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 Windows Batch

batch
Copy
@echo off
setlocal
set str2=
set "str=Hello World!"
for /f "skip=2 delims=" %%I in ('tree "\%str%"') do if not defined str2 set "str2=%%~I"
set "str2=%str2:~3%"
echo %str2%

15 SQL

15.1 MySQL

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

15.2 Oracle

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

16 같이 보기

17 References