acronym 0.5.1 copy "acronym: ^0.5.1" to clipboard
acronym: ^0.5.1 copied to clipboard

A simple, lightweight and easy to use package to generate acronyms.

A simple, lightweight and easy to use package to generate acronyms.

Usage #

You can use it with the standard arguments to generate your acronym:

import 'package:acronym/acronym.dart';

const String input = "The United States of America";
final String output = generateAcronym(input);
print(output); // "USA"

Sample usage with the extension:

import 'package:acronym/acronym.dart';

const String input = "The United States of America";
final String output = input.toAcronym();
print(output); // "USA"

You can use it with stop words like this:

import 'package:acronym/acronym.dart';

const String input = "The United States of America";
final String output = input.toAcronym(stopWords: stopWords);

final String output1 = generateAcronym(input, stopWords: stopWords);
print(output); // "USA"
print(output1); // "USA"

Add your own stop words:

import 'package:acronym/acronym.dart';

const String input = "The United States of America";
final List<String> stopWords = [...stopWords, "states"];
final String output = input.toAcronym(stopWords: stopWords);
print(output); //UA

If you want to generate the Acronym without any words you can do it like this

import 'package:acronym/acronym.dart';

const String input = "The United States of America";
final String output = input.toAcronym(stopWords: []);
print(output); //TUSOA

If you want to generate the acronym out of its syllables just add the splitSyllables Flag

import 'package:acronym/acronym.dart';

const String input = "The United States of America";
final String output5 = input.toAcronym(splitSyllables: true);
print(output5); // UtStArc
20
likes
160
pub points
58%
popularity

Publisher

verified publisherjxstxn.dev

A simple, lightweight and easy to use package to generate acronyms.

Homepage
Repository (GitHub)
View/report issues

Topics

#acronym

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

recase

More

Packages that depend on acronym