Skip to content
Dart implementation of sprintf
Find file
Pull request Compare This branch is 32 commits behind Naddiseo:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
tools
.gitignore
LICENSE.md
README.md
pubspec.yaml

README.md

dart-sprintf

Dart implementation of sprintf.

Getting Started

Add the following to your pubspec.yaml:

dependencies:
  sprintf:
    git: git://github.com/Naddiseo/dart-sprintf.git

then run pub install.

Next, import dart-sprintf:

#import('package:sprintf/sprintf.dart');

Example

#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
Something went wrong with that request. Please try again.