stringprocess 0.0.8

stringprocess

A library for string manipulation.

Status

Build Status

Usage

A simple usage example:

import 'package:stringprocess/stringprocess.dart';

main() {
  // A few simple examples.
  StringProcessor tps = new StringProcessor();

  // Print the numbers 1 to 10.
  print(tps.getSequenceString(1, 10, 1));

  // Repeat Something!
  print(tps.getRepeatedString("Mine!", 42));

  // Word count.
  print(tps.getWordCount("Dart is Awesome and cool!"));

  // Line count.
  print(tps.getLineCount("hello\ngood\nevening\nwelcome!\n"));
}

Unit Testing

  • pub run test

Check source code formatting:

  • dartfmt -n .

Acknowledgements

This package makes use of the following Dart packages:

  • html_unescape
  • markdown

Features and bugs

Please file feature requests and bugs!

Changelog

0.0.8

  • Minor doc updated and SDK constraint changed.

0.0.7

  • Added simple numbering method.

0.0.6

  • Improved split method

0.0.5

  • Added split method

0.0.4

  • Added deleteLinesNotContaining method

0.0.3

  • Update to prepare for Dart 2.0.

0.0.2

  • Documentation added.
  • Minor refactoring and renaming.

0.0.1

  • Initial version extracted from NP8080.

example/stringprocess_example.dart

// Copyright (c) 2017, daftspaniel. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:stringprocess/stringprocess.dart';

main() {
  // A few simple examples.
  StringProcessor tps = new StringProcessor();

  // Print the numbers 1 to 10.
  print(tps.generateSequenceString(1, 10, 1));

  // Repeat Something!
  print(tps.generateRepeatedString("Mine!", 42));

  // Word count.
  print(tps.getWordCount("Dart is Awesome and cool!"));

  // Line count.
  print(tps.getLineCount("hello\ngood\nevening\nwelcome!\n"));
}

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  stringprocess: "^0.0.8"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:stringprocess/stringprocess.dart';

Platforms

About

A collection of string manipulation functions.

Author

Davy Mitchell

Homepage

github.com/daftspaniel/stringprocess/

Documentation

www.dartdocs.org/documentation/stringprocess/0.0.8/

Uploader

daftspaniel@gmail.com

License

BSD (LICENSE)

Published

Sep 28, 2017