Login Register






String Manipulation Demo filter_list
Author
Message
RE: String Manipulation Demo #11
(05-16-2013, 09:16 PM)noize Wrote:
(05-16-2013, 09:00 PM)ArkPhaze Wrote: That's pretty basic stuff, that's not a reliable way of removing special chars in a string though because then you have hundreds of chars that you would be replacing. You go for your knowns... I know that from a-z is the standard, and if you wanted 0-9 in there, you could add that as well, so anything that is not part of the standard alphabet we leave out.

You mean that with that method (I've posted) you can't use special chars? Yeah, I know that, and that's a limitation for sure. I'll be learning something from the code you've posted.

Not exactly, but it's part of it. What I was saying is that if you tried removing all special chars individually, you would have to assume that there is no special chars that exist in that string that you have not considered, so you wouldn't do that. You would check for only what you know you want to exist in the string, not what you want to remove.

Imagine how many of these there are out there: !#@.,[\... etc...

In comparison to the 26 letters of the alphabet. That was my point.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: String Manipulation Demo #12
(05-16-2013, 09:23 PM)ArkPhaze Wrote:
(05-16-2013, 09:16 PM)noize Wrote:
(05-16-2013, 09:00 PM)ArkPhaze Wrote: That's pretty basic stuff, that's not a reliable way of removing special chars in a string though because then you have hundreds of chars that you would be replacing. You go for your knowns... I know that from a-z is the standard, and if you wanted 0-9 in there, you could add that as well, so anything that is not part of the standard alphabet we leave out.

You mean that with that method (I've posted) you can't use special chars? Yeah, I know that, and that's a limitation for sure. I'll be learning something from the code you've posted.

Not exactly, but it's part of it. What I was saying is that if you tried removing all special chars individually, you would have to assume that there is no special chars that exist in that string that you have not considered, so you wouldn't do that. You would check for only what you know you want to exist in the string, not what you want to remove.

Imagine how many of these there are out there: !#@.,[\... etc...

In comparison to the 26 letters of the alphabet. That was my point.

Well, for sure; plus, with my code you can't make use of special chars.
My Bitcoin address: 1AtxVsSSG2Z8JfjNy9KNFDUN6haeKr7LiP
Give me money by visiting www.google.com here: http://coin-ads.com/6Ol83U

If you want a Bitcoin URL shortener/advertiser, please, use this referral: http://coin-ads.com/register.php?refid=noize

Reply

RE: String Manipulation Demo #13
(05-16-2013, 09:23 PM)ArkPhaze Wrote:
(05-16-2013, 09:16 PM)noize Wrote:
(05-16-2013, 09:00 PM)ArkPhaze Wrote: That's pretty basic stuff, that's not a reliable way of removing special chars in a string though because then you have hundreds of chars that you would be replacing. You go for your knowns... I know that from a-z is the standard, and if you wanted 0-9 in there, you could add that as well, so anything that is not part of the standard alphabet we leave out.

You mean that with that method (I've posted) you can't use special chars? Yeah, I know that, and that's a limitation for sure. I'll be learning something from the code you've posted.

Not exactly, but it's part of it. What I was saying is that if you tried removing all special chars individually, you would have to assume that there is no special chars that exist in that string that you have not considered, so you wouldn't do that. You would check for only what you know you want to exist in the string, not what you want to remove.

Imagine how many of these there are out there: !#@.,[\... etc...

In comparison to the 26 letters of the alphabet. That was my point.

Well, for sure; plus, with my code you can't make use of special chars.
My Bitcoin address: 1AtxVsSSG2Z8JfjNy9KNFDUN6haeKr7LiP
Give me money by visiting www.google.com here: http://coin-ads.com/6Ol83U

If you want a Bitcoin URL shortener/advertiser, please, use this referral: http://coin-ads.com/register.php?refid=noize

Reply