string_templates 0.0.3 copy "string_templates: ^0.0.3" to clipboard
string_templates: ^0.0.3 copied to clipboard

A simple library for handling string templates

string-templates #

A simple library for handling string templates. Now can add symbols
in string for requierment length (as in example).

ChangeLog #

ChangeLog.md

Getting Started #

Add the following to your pubspec.yaml:

dependencies:
  string_templates: "^0.0.3"

then run pub install.

Next, import string-templates:

import 'package:string_templates/string_templates.dart';

Example #

import 'package:string_templates/string_templates.dart' as templates;

void main(List<String> arguments) {
  var params = <String, Object>{'arg1': 10, 'arg2': 20};
  print(templates.interpolate('{arg1:%08d}-{   arg2 }-{arg1}', params));
}

00000010-20-10
2
likes
130
pub points
0%
popularity

Publisher

unverified uploader

A simple library for handling string templates

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

sprintf

More

Packages that depend on string_templates