使用希伯来字母将数字转换为字符串 [英] Convert number to string using Hebrew letters

查看:42
本文介绍了使用希伯来字母将数字转换为字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能很简单(甚至可能是骗人的),但我找不到答案 - 如何使用希伯来字母打印数字?

This is probably an easy one (it may even be a dupe), but I cannot find answer to this - how to print number using Hebrew letters?

我尝试更改应用语言和/或使用格式提供程序:

I've tried to change app language and/or using format provider:

myTextBox.Text = 555.ToString(new System.Globalization.CultureInfo("he-IL"));

但我无法获得希伯来文字母.

but I can't get Hebrew letters.

推荐答案

在希伯来语中,我们使用与英语中相同的数字.但是,希伯来字母可以表示数字.
对于 א 是 1,ב 是 2,依此类推.但是当你到达 10 的 י 后,下一个字母是 כ,但它代表 20.所以 11 就是 י"א.(这就是它用希伯来语写的方式,字母之间有标记").
你的下一个字母是 30,依此类推,直到你达到 100,然后下一个是 200、300,最后一个字母是 400(ת).

In hebrew we use the same numbers as in english. However, hebrew letters can indicate numbers.
For א that is 1, ב is 2 and so on. But after you reach י which is 10, the next letter is כ, but it stands for 20. So 11 would be י"א. (that's the way it's written in hebrew, with the " mark between the letters).
Your next letter would be 30 and so on untill you get to 100, then the next one is 200, 300 and the last letter is 400 (ת).

完整的希伯来字母是:
(注意希伯来字母是从右到左写的,意思是א是第一行,י是最后一行)
אבגדהוזחטי(即 1 到 10)
כלמנסעפצ(即 20 到 90)
קרשת(即 100 到 400)

The entier hebrew alphabet is:
(note that the hebrew letters are written from right to left, meaning that א is the first and י is the last in the first row)
אבגדהוזחטי (that's 1 to 10)
כלמנסעפצ (that's 20 to 90)
קרשת (that's 100 to 400)

(有一些空格字母的结尾形式不同,但它们的数值与普通字母相同.例如,ך是字母的写法כ如果是单词的最后一个字母,但数值还是20)

(there are some spacial letters with different forms for ending a word, but they have the same numeric value as the regular letter. for example, ך is the way to write the letter כ if it's the final letter of a word, but it's still 20 for the numeric value)

所以数字 600 可以转换为 שש"ש,或转换为 ש"ת,或任何字母组合,总和为 600.当然,这如果您想将数字翻译成希伯来语字母,这可能会给您带来问题.

So the number 600 may translate to שש"ש, or to ש"ת, or any combination of letters that will sum up to 600. Of course, this may pose a problem for you if you want to translate numbers to hebrew letters.

我可能会选择尽可能短的组合,因此测试可以递归使用的最高值字母,直到您可以将所有字母与所请求的数字相加.

I would probably go for the shortest combination possible, so test for the highest value letter that can be used recursively until you can sum all the letters you have to the requested number.

这篇关于使用希伯来字母将数字转换为字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆