SQL Server gets the pinyin initials of the Chinese character string, and the friend needs to refer to it. The code is as follows: CREATE function fgetpy (@str varchar = ") returns varchar ($) AS BEGIN declare @strlen int, @return varchar (500), @ii int DECLARE @c nchar (1), @chn nchar (1) Select @strlen =len (@str), @return = ', @ii =0 set @ii =0 while @ii = ' acridine ' Select @c = ch AR (COUNT (*) +63) from (select Top + from (select CHN = ' acridin
to the GB2312 encoded first character, you can locate all first-level Chinese characters Pinyin initials (regardless of the polyphone situation). The above information is given in the table below. Please use this table to write a program to find out the pinyin initials of commonly used Chinese characters.a Ah, b0a1.b Pattaya b0c5C Rub b2c1D-Lap B4eee moth B6eaF FA b7a2G-Karma B8C1h ha b9feJ hit BBF7k Keral
This article mainly introduces PHP to get the initials in English, involving PHP explode and strtoupper function PHP string segmentation and case conversion of the relevant skills, with a certain reference value, the need for friends can refer to the next
The example in this paper describes how PHP obtains the initials in English. Share to everyone for your reference. Specific as follows:
This code can a
acquisition of single-character pinyin, and return the character itself when no pinyin is found.
Wang Siyan July 23, 2012 NightConvert Chinese to the. NET component of the phonetic text and initials. Example:Using System;Using System.Collections.Generic;Using System.Text;Using Npinyin;Namespace Npinyintest{Class Program{Static void Main(String[]Args){String[]Maxims= New String[]{"Things often violate people, things are always human.","The steed
Get Pinyin Initials-(NSString *) Firstcharactor: (NSString *) astring{Turns into a mutable stringnsmutablestring *str = [nsmutablestring stringwithstring:astring];Convert to pinyin with tones firstCfstringtransform ((cfmutablestringref) str,null, kcfstringtransformmandarinlatin,no);NSLog (@ "%@", str);Convert to pinyin with no tonesCfstringtransform ((cfmutablestringref) str,null, kcfstringtransformstripdiacritics,no);NSLog (@ "%@", str);Translate to
PHP implementation to get the Chinese and English initials,
PHP implementation to get Chinese and English according to the first letter
/** * */function Getfirstchar ($s 0) {if ($s 0[0]== ' i ' | | $s [0]== ' I ') {return "I"; }elseif ($s 0[0]== ' u ' | | $s [0]== ' u ') {return ' U '; }elseif ($s 0[0]== ' V ' | | $s [0]== ' V ') {return ' V '; }else{$fchar = Ord ($s 0{0}); if ($fchar >= ord ("A") and $fchar
The above mentioned i
Android Address Book fuzzy search (numbers, names, initials, full spelling), batch select contactsAndroid Address Book fuzzy search (numbers, names, initials, full spelling), batch select contacts
The company encountered a requirement in a recent project that needed to read contacts in the address book and support fuzzy queries and batch selection of contacts. Several examples were found online, fuzzy query
PHP gets the initials in English,
The example in this paper describes how PHP obtains the initials in English. Share to everyone for your reference. Specific as follows:
This code can analyze the initial output of the name according to the English name entered by the user, such as "Billy Bob" to "b.b."
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/1031481
This paper describes the method of getting the initials of Chinese characters by PHP custom function. Share to everyone for your reference, as follows:
The first letter is important and can be used for sorting.
City list and so on.
The above is the PHP custom function to get the first letter of the content of the method, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!
-->
}), if ($fchar >=ord (' A ') $fchar
Then the next step is to sort the two-dimensional data. I thought for a long time, then thought of the scheme, first call the first letter in the loop method, and then use this letter as key, because PHP has a method based on key, so my code is written so that it is done:
Store name $shopdata = $this->_shopnamesarray;//based on the name of the first Chinese character in the store $settles = $result [' data ']; $settlesRes = Array (); foreach ($settles as $
In our previous PHP support for rare characters to pinyin and the text of the PHP pinyin to get the first letter of the two articles, we are introduced how to get the first letter of Chinese characters, rare words of the pinyin, then we are going to introduce to you today is how to implement the Chinese pinyin and all Chinese pinyin initials!
The first step is to download the PHP that we need to use in this lesson to implement the Chinese Pinyin cla
capitalize the initial letterTime limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others) total submission (s): 49003 Accepted Submission (s): 27058problem DescriptionEnter an English sentence and change the first letter of each word to uppercase. InputThe input data contains multiple test instances, each of which is a line of English sentences with a length of not more than 100. OutputPlease output the English sentences that have been rewritten as required. Sample InputI like
A recent project has a need to extract the initials of each word in a sea classifier of Chinese and English (including Arabic numeral 0-9):
Gannicus-->g
Free-->z
2b-->e
Silly X-->s
Copy Code code as follows:
Private function Getfirstchar ($s 0) {
$s =iconv (' UTF-8 ', ' gb2312 ', $s 0);
if (Ord ($s 0) >128) {//Kanji start
$asc =ord ($s {0}) *256+ord ($s {1})-65536;
if ($asc >=-20319 and $asc if ($asc >=-20283 and $asc if ($asc >=-19
Chinese characters
According to the initials of Chinese characters, to find relevant records in the table, how to achieve? For example, enter "Zgyh", you can find all the "Bank of China" records.
if exists (SELECT * from dbo.sysobjects WHERE id = object_id (N ' [dbo].[ F_GETPY] and Xtype in (n ' FN ', n ' IF ', n ' TF '))
Drop function [dbo]. [F_getpy]
Go
--Create phonetic function
Create function f_getpy (@Str nvarchar (400))
Returns nvarchar (4000
Are you familiar with Iwebshop PHPer? How can you sort English brands by their first letter? How can you change the editor? The default editor feature is too bad. Would you like to find a better open-source full-English Editor? Are you familiar with Iwebshop PHPer? How can you sort English brands by their initials?
There is also a way to change the editor. The default editor function is too bad. I want to find a better open-source full-English Editor
Public class converttopinying{/// /// Abbreviated Chinese character to PinYin/// /// /// Public static string getpystring (string Str){String tempstr = "";If (! Ischina (STR )){Return STR;}Foreach (char C in Str){If (INT) C >=33 (INT) C {// Reserved letters and symbolsTempstr + = C. tostring ();}Else{// Accumulate the pinyin initialsTempstr + = getpychar (C. tostring ());}}Return tempstr;}
Public static bool ischina (string cstring){Bool boolvalue = false;For (INT I = 0; I {If (convert. toint32
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.