pccomponentes/lexicographic-ranking 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pccomponentes/lexicographic-ranking

最新稳定版本:v0.0.5

Composer 安装命令:

composer require pccomponentes/lexicographic-ranking

包简介

Lexicographic order calculator, useful for persisting ordered lists.

README 文档

README

Lexicographic order calculator, useful for persisting ordered lists.

Installation

Install via composer

composer require pccomponentes/lexicographic-ranking

Usage

$calculator = new RankingCalculator(
    new Alpha36TokenSet(),
    new DynamicMidPosition()
);

echo $calculator->between('A', 'B');   // AU
echo $calculator->between('F6', 'Z');  // P
echo $calculator->between('FB', 'FW'); // FL
echo $calculator->between(null, '7');  // 3
echo $calculator->between(null, null); // U

Config options

Token sets

The char pool to create the rankings. The following are available:

NumericTokenSet (0-9)
Alpha36TokenSet (0-9 and A-Z)
Alpha62TokenSet (0-9 and A-z)

To create a custom one extend from TokenSet.

Position

The space to be left between ranks. The following modes are available:

FixedStartPosition  // Leaves a fixed amount of spaces after the first input
FixedEndPosition    // Leaves a fixed amount of spaces before the second input
DynamicMidPosition  // Leaves the same space before and after the result

To create a custom one implement Position.

统计信息

  • 总下载量: 5.46k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-11-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固