이번에는 언어별로 format 문을 적어보았습니다.
String hello = "Hello World";
System.out.printf("출력: %s%n", hello);
System.out.println(String.format("출력: %s", hello));
hello = "Hello World"
print("출력: {0}".format(hello))
print("출력: {}".format(hello))
print("출력: %s" % hello)
hello = "Hello World"
puts "출력: %s" % [hello]
puts "출력: #{hello}"
String hello = "Hello World"
println(String.format("출력: %s", hello))
val hello: String = "Hello World"
println("출력: $hello")
println("출력: ${hello}")
printf("출력: %s","Hello World");
std::format("출력: {}", "Hello World");
Console.WriteLine(String.Format("출력: {0}", "Hello World"));
import "fmt"
var value = "Hello World"
fmt.Printf("출력: %s", value)
ㅇㅅㅇ...
use std::fmt::format;
use std::io;
let hello = "Hello World";
let a = format!("출력: {}", hello);
println!("{}", a);
println!("출력: {}", hello);
import Cocoa
let hello = "Hello World"
print(String(format: "출력: %@", hello))
솔직히 이 시리즈 쓸때마다 IDE 종류별로 다 열어서 확인해봐서 귀찮네요... 몇개는 그냥 쌩으로 쓰는데 언어왔다갔다하는 많큼 헷깔려서 확인을 해야한다는...