简体   繁体   English

"是否可以在 IntelliJ IDEA 中编写 lambda 字母 (λ)?"

[英]Is it possible to write lambda letter (λ) in IntelliJ IDEA?

This is all about your keyboard and OS, and not specific to Intellij IDEA.这完全与您的键盘和操作系统有关,而不是特定于 Intellij IDEA。 You can create one by copy and pasting, which is pretty easy.您可以通过复制和粘贴来创建一个,这非常容易。 If you want to insert it directly then use the way of typing special characters specific to your platform (Windows, Mac, Linux, ...).如果您想直接插入它,请使用键入特定于您的平台(Windows、Mac、Linux 等)的特殊字符的方式。

So for example on Mac you could:因此,例如在 Mac 上,您可以:

You can express any Unicode character anywhere in Java source code via the \? form.您可以通过 \? 形式在 Java 源代码中的任何位置表示任何 Unicode 字符。 It is not just for String<\/code> s and char<\/code> s.它不仅适用于String<\/code> s 和char<\/code> s。 (For characters outside the BMP, you need two of those, forming a surrogate pair.) Inasmuch as there sometimes are multiple characters with similar glyphs, Unicode escapes have the advantage of being totally unambiguous. (对于 BMP 之外的字符,您需要其中的两个,形成代理对。)由于有时有多个字符具有相似的字形,Unicode 转义具有完全明确的优点。

Presumably the character wanted in this case is the one Unicode names "Greek small letter lamda", U+03BB, which you can express anywhere in Java source code as \λ<\/code> .大概在这种情况下想要的字符是一个 Unicode 名称“希腊小写字母 lamda”,U+03BB,您可以在 Java 源代码中的任何地方将其表示为\λ<\/code> 。

"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM