在Delphi7中从字符串中剥离非字母数字字符的最快方法是什么? [英] What is the fastest way of stripping non alphanumeric characters from a string in Delphi7?

查看:416
本文介绍了在Delphi7中从字符串中剥离非字母数字字符的最快方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

允许的字符是A到Z,a到z,0到9.最少的代码或单个函数将是最好的,因为系统在响应输入时是至关重要的。

The characters allowed are A to Z, a to z, 0 to 9. The least amount of code or a single function would be best as the system is time critical on response to input.

推荐答案

uses JclStrings;

  S := StrKeepChars('mystring', ['A'..'Z', 'a'..'z', '0'..'9']);

这篇关于在Delphi7中从字符串中剥离非字母数字字符的最快方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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