承接 neoisrecursive/emojify 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

neoisrecursive/emojify

Composer 安装命令:

composer require neoisrecursive/emojify

包简介

convert shortnames to emojis and see if shortname is emoji

README 文档

README

provides methods for

  • checking if string is shortcode
  • replace shortcode with emoji
  • replacing all shortcodes in string with emoji

Installation

You can install it with composer:

composer require neoisrecursive/emojify

usage

use Neoisrecursive\Emojify;

$emojify = new Emojify();

$string = 'hello here is an emoji :smile:';

$emojify->WholeString($string);
// hello, here is an emoji 😄

$emojify->IsShortname(':sunglasses:');
//bool(true)

$emojify->ShortnameToEmoji(':sunglasses:');
//string(4) "😎"

how it works (behind the scenes)

The regex looks for a ":" and then for spaces(" "), since no shortcode contains spaces and breaks if it finds one, if not then another ":", and if the characters inside is a shortcode it returns true.

$string3 = ':not_emoji::smile: will work, :not_emoji:smile: will
not while :not_emoji :smile: will work'

$emojify->WholeString($string3);
//string(85) ":not_emoji:😄 will work, :not_emoji:smile: will not while :not_emoji 😄 will work"

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-only
  • 更新时间: 2022-03-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固