v7.0.0
sprintf
sprintf의 Dart 구현. sprintf("hello %s", ["world"]); 과 같은 간단한 printf 유사 포맷을 제공합니다.
139좋아요 689만30일 다운로드130Pub 점수
AndroidiOSWebmacOSWindowsLinux
Dart의 sprintf 구현
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Dart implementation of sprintf.
Add the following to your pubspec.yaml:
dependencies:
sprintf: "^7.0.0"
then run pub install.
Next, import dart-sprintf:
import 'package:sprintf/sprintf.dart';
import 'package:sprintf/sprintf.dart';
void main() {
print(sprintf("%04i", [-42]));
print(sprintf("%s %s", ["Hello", "World"]));
print(sprintf("%#04x", [10]));
}
-042
Hello World
0x0a
Differences to C's printf