On Android 4.4.3 , the contact's avatar displays the first letter by default, but does not support Chinese characters such as:If the first digit of the contact's name is an English character (A-Z | | A-Z), the default avatar will display the first
In a project, you need to make queries based on the first letter of certain query conditions (such as name). For example, if you want to query a person named "James", you can enter 'zs '. A tool class is written as follows:
/** GB 2312-80 divides
Today, I suddenly used the function of extracting the first letter of Chinese characters and pinyin. I went online and found that there were not many useful ones. I decided to write one by myself. The effect was good. I sent it to everyone to study
Method 1: first query all records and then query the records after the logical layer is converted to the first letter of the pinyin alphabet. It is obvious that dummies will do this.
Method 2: Add a field to the table to be searched to store the
This article mainly introduces the method of getting the first letter of Chinese pinyin in PHP, the need for friends can refer to the following
In reality, we often see such a description, ranked in no particular order, according to the first
This article describes how to obtain the first letter of an English name in php. it involves the explode and strtoupper function operations related to php string segmentation and case-sensitivity conversion. it has some reference value, for more
Php gets the first letter of Chinese characters and pinyin. you can test it on your own. Php gets the first letter of Chinese characters and pinyin. you can test it on your own.
Php obtains the first letter of Chinese Pinyin
The code is as follows:
Php retrieves the first letter of a Chinese string
When you encounter a Chinese character string sorting problem, you need to obtain the first letter of the Chinese character. The program can obtain the first letter of any character
The first letter of Chinese characters in php to pinyin. PHP obtains the first letter of pinyin.
After running the program, some characters in the string cannot be converted. If you enter these words separately, you can directly convert them to read
This article mainly describes how to cancel the Microsoft Office software OneNote, work, Outlook, such as the initial capitalization of the AutoCorrect entries, other Office Office software related settings, you can refer to this article for the
PHP gets the string first letter method, PHP gets the string
This example describes how PHP obtains the first letter of a string. Share to everyone for your reference. The implementation method is as follows:
"; $i =0;while ($i
= ' B0 ')
C # obtain the first letter of Chinese characters and pinyin,
I recently learned a truth, and I will share it with you here: Education represents your past, your present abilities represent your present, and learning represents your future.
Ten
PHP obtains the first letter of a Chinese/English string.
Use Cases: When filtering regions, we often see filtering and locating by English letters. At first we thought it was too troublesome to relate the areas stored in the data table to the first
This function is generally used to generate the abbreviation of the first letter of a name. For example, it is used when I write a program this afternoon. It is very simple for the country logo code, because its ANSII encoding is arranged in the
When requesting JSON data, passing the past string type to JSON data often has a case where the first letter is capitalized, such as "Loginaccount": "02:00:00:62:73:74", "Logintype": "1", "Mac": " 02:00:00:62:73:74 "and so on. When converting to
Usage scenarios: When filtering the area, we often see that the English alphabet is used to filter the location, initially thinking that the data table is stored on the region and the first letter association, but it is too troublesome, and then
The method used in the development, take out the first letter of a Chinese character;/** * Take the first letter of Chinese character * @param string $str * @return String|null*/functionGetfirstchar ($str) { if(Empty($str)) { return‘‘; }
Init () methodIf you want to do some initialization work in a go file, you can put the code in the Init () method.The init () method is executed first.// initializationof package}Note: It is not an input parameter and a return parameter.Identifier
Download a lot of English songs from the Internet lyrics (LRC format), found that many of the lyrics of all the letters are lowercase, especially the first letter of the sentence is not capitalized, although not serious, but for the pursuit of
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.