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

81번째 줄: 81번째 줄:
{{참고|PHP strtolower()}}
{{참고|PHP strtolower()}}
<source lang='php'>
<source lang='php'>
$str = "Hello World!";
echo strtolower( "Hello World!" );
echo strtolower($str);
# hello world!
</source>
</source>



2016년 3월 30일 (수) 18:14 판

1 개요

downcase
lc
lower
lowercase
lowercaseString
strtolower
tolower
toLowerCase
  • Definition: lowercase(string) returns string
  • Description: Returns the string in lower case.

2 Bash

echo "Hello, World" | tr 'A-Z' 'a-z'
# hello, world

3 C

#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] = tolower(string[i]);
    }
    puts(string);                       /* "wiki means fast?" */
    return 0;
}

4 C#

"Wiki means fast?".ToLower();        // "wiki means fast?"

5 Excel

=LOWER("HELLO")
// hello

6 Java

String str = "Hello World!";
System.out.println(str.toLowerCase());

7 JavaScript

var str = "Hello World!";
document.write(str.toLowerCase());

8 Objective-C

NSString *str = @"Hello World!";
NSLog(@"%@", [str lowercaseString];

9 Perl

$str = "Hello World!";
print lc($str);

10 PHP

echo strtolower( "Hello World!" );
# hello world!

11 Python

str = "Hello World!"
print str.lower()

12 Ruby

str = "Hello World!"
str2 = str.downcase
puts str2
str = "Hello World!"
str.downcase!
puts str

13 Scheme

(use-modules (srfi srfi-13))
(string-downcase "Wiki means fast?") ;  "wiki means fast?"

14 SQL

14.1 MySQL

SELECT LOWER( "HELLO WORLD" );
-- hello world

14.2 Oracle

SELECT LOWER('HELLO WORLD') FROM DUAL;
-- hello world

15 같이 보기

16 References