/// /// This class converts Arabic numerals to uppercase Chinese/// This class does not identify illegal numbers. Please determine in advance whether the numbers are valid/// Public class ChineseNum{
// Convert lowercase to uppercasePublic static string GetChineseNum (string p_num){ChineseNum cn = new ChineseNum ();
Return cn. NumToChn (p_num );}
// Convert the lower-case amount to the upper-case amount
Public static string GetUpperMoney (double p_Mon
, because it was previously reversed) is also 0, then skip, otherwise read as "0"Break}Newary = zero + newary;zero = ";}else {//If not "0"Newary = This.ary0[parseint (Ary[i]) + this.ary1[i% 4] + newary; The expected character is converted into a numeric type, and as an index number of the array ary0, in order to get the corresponding Chinese reading method, followed by its first class unit (empty, ten, hundred or thousands) and finally added to the previous deposit reading content.}}if (Newary.i
Recently, as a result of this need, I wrote a "Arabic numerals to Chinese numerals" function ". Only one similar one is found in the search for the essence area.I felt that my algorithm was good, so I posted it and shared it. If you want to convert the amount, you need to modify the processing of the decimal part.Function ch_num ($ num, $ mode = true ){$ Char = array ("zero", "one", "two", "three", "Si", "Wu", "Lu", "Jun ", "success", "fail ");$ Dw =
In android Arabic, the motion track image is edited in the Image Library, and a green image is displayed in the animation.Alps/packages/apps/Camera/src/com/android/camera/FileSaver. java1: import java. util. Locale;2: modify the function:Public void refactoerTitle (){......If (mTag! = INTERMEDIA_IMAGE ){// If the data is InterMedia file, the file name not// Have the indexMTitle + = String. format ("% 02d", mIndex );}SetIgnoreThumbnail (true );}Changed
Recently, as a result of this need, I wrote a "Arabic numerals to Chinese numerals" function ". Only one similar one is found in the search for the essence area.I felt that my algorithm was good, so I posted it and shared it.If you want to convert the amount, modify the processing of the decimal part.Function ch_num ($ num, $ mode = true ){$ Char = array ("zero", "one", "two", "three", "si&qu
Copy Code code as follows:
#!/usr/bin/python
#-*-Encoding:utf-8-*-
Import types
Class Notintegererror (Exception):
Pass
Class Outofrangeerror (Exception):
Pass
_mapping = (U ' 0 ', U ' one ', U ' two ', U ' three ', U ' four ', U ' v ', U ' vi ', U ' seven ', U ' eight ', U ' Nine ',)
_p0 = (U ', U ' ten ', U ' hundred ', U ' thousand ',)
_S4, _s8, _S16 = 10 * * * 4, 10 * * 8, 10 * * 16
_min, _max = 0, 9999999999999999
def _to_chinese4 (num):
"" Converts the
function | Chinese to convert "54883661" to "54,883,661" function
'################################
' Function name: Arabic numeral to Chinese digit function
' Author: Net-Sea survivors '
' qq:54883661 date:2002.3.7
'################################
function Chnumstr (num)
Strlen=len (num)
For I=1 to Strlen
Select Case Mid (num,i,1)
Case 1:chnum= "One": Case 2:chnum= "Two": Case 3:chnum= "three": Case 4:chnum= "Four": Case 5:chnum= "Five"
Case 6:chnu
function |
chinese_money.php
Changing Arab money num to Chinese money num
/*======================
Functions List:
Chinese_money_max ()
Before the decimal point
This function can be used individually to convert Arabic numerals to Chinese digits (uppercase and lowercase, default to upper case)
Integers only (both positive and negative)
Chinese_money_min ()
After the decimal point is processed
Chinese_money ()
=======================*/
function C
Transformation just saw a brother to ask the question, finished just found already knot paste, depressed ah ~ ~
Just see this thing is useful, so posted out from the reward hehe
Ideas:
At first the thought of using Select, for the loop to convert each Arabic numeral to the corresponding Chinese, and then think of actually can use an array, this looks less code, after all, 0~9, can correspond, but ~ problem appeared, for 10~31, to become "two pick one"
: This article describes how to convert Arabic numerals into Chinese. For more information about PHP tutorials, see. I haven't written it for a long time. Recently, I used a function implementation to convert the financial amount from numbers to Chinese, and recorded the following:
Class MoneyConstConfig {/*** ing of numbers in Chinese */public static $ NUM_CH_MAP = array (0 => '0', 1 => 'yi ', 2 => 'ER', 3 => 'san', 4 => 'ta', 5 => 'wu', 6 => 'L ',
Recently, because of the need, wrote a "Arabic numerals to Chinese numbers function." The search for the essence area saw a similar one.
I feel my algorithm is good, so paste it out to share if you want to use for the amount of conversion, the number of parts of the processing to do a change
function Ch_num ($num, $mode =true) {
$char = Array ("0", "one", "II", "three", "the", "WU", "Lu", "Qi", "ba", "JIU");
$DW = Array ("", "Pick", "Bai", "Thousand"
This article describes how php converts Arabic and Roman numerals. it involves php string operations related skills and has some reference value, for more information about how to convert Arabic and Roman numerals in php, see the following example. Share it with you for your reference. The details are as follows:
I hope this article will help you with php programming.
Source publishing: http://darkbull.net/101/%E5%B0%86%E9%98%BF%E6%8B%89%E4%BC%AF%E6%95%B0%E5%AD%97%E8%BD%AC%E6%8D%A2%E6%88%90%E4%B8%AD%E6%96%87
At home on weekends, I wrote a small program to convert Arabic numerals into uppercase Chinese. The program has not been optimized, and has gone through detailed tests. It is mounted to the internet for use directly when necessary in the future.
Source codeTest code
#! /Usr/bin/Python #-*-encoding: UTF-8-*-impo
I encountered the requirement to convert Chinese characters and numbers to Arabic numerals. I checked on the Internet and found that all Arabic numerals are converted into Chinese characters, I had to write it myself. After studying the algorithm , I finally completed the function. The principle is also very simple: cyclically input each bit of the string to determine whether it is a unit or a number. If i
Convert English numerals to Arabic numeralsRandomly read a few algorithm problems, the following answer is written by others, not I writeIdeas:Three to make a distinction betweenCode: Public classpoj_2121 { Public Static voidMain (string[] args) {/*** Negative, zero, one, three, four, five, six, seven, * Eight, nine, ten, eleven, twelve, thi Rteen, fourteen, fifteen, * Sixteen, seventeen, eighteen, nineteen, twenty, thirty, forty, Fifty, * s Ixty, Sev
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.