排序字符串 [英] Sorting a string
本文介绍了排序字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要对一个字符串进行排序,实际上是数千个字符串,而我的头部疼痛,我不记得是否有内置函数来执行此操作。 (Access 2003)
我有一个字符串,比方说,BDCA我想要返回ABCD
是否有内置函数,或者我必须记住我很久以前的学校课程并编写一些冒泡排序函数来做这个?
解决方案
有一个内置的排序功能,通过一点点搜索,我发现自己。它实际上是一个隐藏的类。这堂课叫做Wizhook。您可以通过启用show hidden members在对象浏览器中找到它。班上有不少整齐的成员。你正在寻找的是SortStringArray。
这里看看它:
展开 | / span> 选择 | 换行 | 行号
有一个内置的排序功能,通过一点点搜索,我发现自己。它实际上是一个隐藏的类。这堂课叫做Wizhook。您可以通过启用show hidden members在对象浏览器中找到它。班上有不少整齐的成员。你正在寻找的是SortStringArray。
这里看看它:
展开 | / span> 选择 | 换行 | 行号
大!我只是希望有一个字符串函数将所有字符串的字符发送到一个数组,而不是自己循环遍历它。 C#中有一个方便的功能来执行此操作。但当然没有两种语言是相同的。
I need to sort a string, actually several thousand strings, and my head aches and I can''t remember if there is a built in function to do this. (Access 2003)
I have a string, say, "BDCA" and I want to return "ABCD"
Is there a built in function for this, or do I have to remember my school lessons of ages ago and write some bubble sort function to do this?解决方案There is a built-in sort function which through a little searching I just found myself. It''s actually a hidden class. The class is Called Wizhook. You can find it in the object browser by turning on show hidden members. There''s quite a few neat members to the class. The one you are looking for is SortStringArray.
Here''s a look at it:
Expand|Select|Wrap|Line Numbers
There is a built-in sort function which through a little searching I just found myself. It''s actually a hidden class. The class is Called Wizhook. You can find it in the object browser by turning on show hidden members. There''s quite a few neat members to the class. The one you are looking for is SortStringArray.
Here''s a look at it:
Expand|Select|Wrap|Line Numbers
Great! I was just hoping there was a string function that will send all of a string''s characters to an array instead of having to loop through it yourself. There was a handy function in C# to do this. But of course no two languages are the same.
这篇关于排序字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文登录 关闭
扫码关注1秒登录发送“验证码”获取 | 15天全站免登陆