• 11.2 如何取得汉字的拼音或者拼音首字母缩写?


    所在组件:IBeamMDAACore.dll

    名称空间:IBeam.MDAA.Utility

    用法举例:       _Code =Chinese2Spell.GetHeadOfChs(_Name);

    推荐用法,取拼音字母时放在ORM类中,可保证正确性:

    #region 名称

            protected string _Name;

            /// <summary>

            /// 名称

            /// </summary>

            [Property(NotNull = true, Length = ConstSetting.ShortVarchar)]

            public string Name

            {

                get

                {

                    return _Name;

                }

                set

                {

                   

                    _Name = value;

                    if (string.IsNullOrEmpty(_Name))

                    {

                        _Code = string.Empty;

                    }

                    else

                    {

                        _Code =Chinese2Spell.GetHeadOfChs(_Name);

                    }

                }

            }

            #endregion

     

            #region 拼音速记码

            private string _Code;

            /// <summary>

            /// 拼音速记码

            /// </summary>

            [Property(Length = ConstSetting.ShortVarchar)]

            public string Code

            {

                get { return _Code; }

                set

                {

                    _Code = value;

                }

            }

            #endregion

  • 相关阅读:
    Django URL
    django初识
    django 相关配置(pycharm)
    mysql数据库语言分类
    css常用
    Django—BBS注册页面
    Django—Auth认证模块
    Django—中间件
    Django—form组件,cookie和session
    Django—AJAX
  • 原文地址:https://www.cnblogs.com/yyj/p/2209860.html
Copyright © 2020-2023  润新知