具有多种语言的等效功能的网站

发布于 2024-09-27 09:33:32 字数 322 浏览 2 评论 0原文

学习(或重新学习)语言时,需要花费大量时间来学习执行基本操作的函数。例如,假设我想反转一个字符串。在一种语言中,它可能很简单,如myString.reverse()。在 Python 中,它是 myString[::-1]。在其他语言中,您可能必须创建一个数组,迭代字符串并以相反的顺序添加所有字符,然后将其转换回字符串。非常有用的是一个参考,这样如果你知道一种语言的函数名称,那么我就可以找到另一种语言的等效名称。目前,谷歌搜索或搜索 StackOverflow 似乎并不能很好地解决这个问题,因为您通常必须尝试大量不同的查询。我想我正在考虑某种维基系统。有没有这样做的网站?

When learning (or relearning) a language, a significant amount of time goes into learning the functions for doing basic operations. For example, suppose I want to reverse a String. In one language, it may be simple as myString.reverse(). In Python, it is myString[::-1]. In other languages, you may have to create an array, iterate through the string and add all the characters in reverse order and then convert it back to a string. What would be extremely useful would be a reference so that if you know the name of the function in one language, then I could find the equivalent in another. Googling or searching StackOverflow don't seem to solve this problem very well at the moment, as you have to usually try a large number of different queries. I guess I am thinking of some kind of Wiki system. Are there any websites that do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤寂小茶 2024-10-04 09:33:32

听起来您正在寻找 Rosetta 代码。事实上有一个关于反转字符串的页面。

It sounds like you're looking for Rosetta Code. There is in fact a page on reversing a string.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文