stringprocess 1.0.9

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 83

stringprocess

A string library for common string operations and general text helper functions.

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

1.0.9

  • Fixes to line duplication and UTs.
  • Refactor to use more type inference.

1.0.8

  • Update for Dart 2.

1.0.7

  • Improve Duplicate line by index when next to new line.

1.0.6

  • Further sentence count improvements.
  • New function - convert tabs to spaces.

1.0.5

  • Improve sentence count by ignore sentences that are numbers only.
  • New function - Remove numbers from a string.
  • New function - Duplicate line by index.

1.0.4

  • Count sentences in the text supplied.

1.0.3

  • Sort lines in string by length (ascending).

1.0.2

  • Splice function covers cases where splice values are outside string length.

1.0.1

  • Splice changes.
  • Refactor line splitting.

1.0.0

  • Bump to version 1 as package is stable.
  • Added splice method to chop characters off start/end of a line.

0.0.9

  • trimAllSpaces function added.

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-2018, 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.
  var 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"));
}

Use this package as a library

1. Depend on it

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


dependencies:
  stringprocess: ^1.0.9

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 flutter 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';
  
Version Uploaded Documentation Archive
1.0.9 Jul 25, 2018 Go to the documentation of stringprocess 1.0.9 Download stringprocess 1.0.9 archive
1.0.8 Jul 24, 2018 Go to the documentation of stringprocess 1.0.8 Download stringprocess 1.0.8 archive
1.0.7 May 30, 2018 Go to the documentation of stringprocess 1.0.7 Download stringprocess 1.0.7 archive
1.0.6 May 20, 2018 Go to the documentation of stringprocess 1.0.6 Download stringprocess 1.0.6 archive
1.0.5 May 19, 2018 Go to the documentation of stringprocess 1.0.5 Download stringprocess 1.0.5 archive
1.0.4 May 3, 2018 Go to the documentation of stringprocess 1.0.4 Download stringprocess 1.0.4 archive
1.0.3 Apr 27, 2018 Go to the documentation of stringprocess 1.0.3 Download stringprocess 1.0.3 archive
1.0.2 Apr 4, 2018 Go to the documentation of stringprocess 1.0.2 Download stringprocess 1.0.2 archive
1.0.1 Mar 31, 2018 Go to the documentation of stringprocess 1.0.1 Download stringprocess 1.0.1 archive
1.0.0 Mar 30, 2018 Go to the documentation of stringprocess 1.0.0 Download stringprocess 1.0.0 archive

All 18 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
67
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
83
Learn more about scoring.

We analyzed this package on Aug 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.11.8

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:stringprocess/stringprocess.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <3.0.0
html_unescape ^1.0.1 1.0.1+2
markdown ^2.0.2 2.0.2
Transitive dependencies
args 1.5.0
charcode 1.1.2
Dev dependencies
test ^0.12.0