Files
shanxia2.0/backend/venv/lib/python3.9/site-packages/pypinyin/style/initials.py
T
2026-08-08 20:43:48 +08:00

14 lines
352 B
Python

# -*- coding: utf-8 -*-
"""Style.INITIALS 风格"""
from __future__ import unicode_literals
from pypinyin.constants import Style
from pypinyin.style import register
from pypinyin.style._utils import get_initials
@register(Style.INITIALS)
def convert(pinyin, **kwargs):
strict = kwargs.get('strict', True)
return get_initials(pinyin, strict)