473,586 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to remove spaces and special characters in a string using isalpha?

8 New Member
Wondering how to take a string and remove special characters and spaces.

Example: how are you?
would be: howareyou
Sep 21 '18 #1
2 2038
weaknessforcats
9,208 Recognized Expert Moderator Expert
Call isalpha on each characters of your string and if isalpha returns true,then append the character to your new string.


I can help you correct code you have written but I cannot write the code for you.
Sep 23 '18 #2
donbock
2,426 Recognized Expert Top Contributor
You should decide whether you want to copy a space-removed version of the input string into a new output string or if you want to modify the input string itself.

Either approach can be legitimate, but the way you solve the problem will be different.
Sep 27 '18 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
11186
by: Marc Durufle | last post by:
I have a string like that " Vertices " and i want to obtain "Vertices" I would want to know if there is a simple way to put off spaces on a string, thank you -- Marc Durufle Inria Rocquencourt Tel : 01 39 63 56 27 --------------------------
7
35898
by: Mindy Geac | last post by:
Is it possible to delete special caracters from a string and multiple spaces? When the input is : "a&*bbb cc/c d!d" I want the result : "abbb ccc dd" thnx. MJ <?php
8
3653
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box and save it to a file. This step is not to hard however the contents of the textarea is mostly latex source so it contains just about every special...
4
23796
by: feucos | last post by:
Hi all, I am new to these so plz never mind if this is funny. here is my problem : Table : moody Column : Title
15
15610
by: DanielJohnson | last post by:
I am writing a program in which I am removing all the spaces from the string. I thought that I could do it two ways. One was parsing the string character by character and copying onto another output string. But this was trivial. The other option is to use pointers and shift all the characters after the space by one space to the left. I did...
1
4787
by: JB | last post by:
Hi All, I'm writing XML in VB.NET 2005 using the System.Xml.XmlWriter class. It's all working fine but I'd like to remove a few NewLine characters. For instance if I use the following code: Writer.WriteStartElement("Name") oObject.WriteXml(Writer) 'This object writes it's ow Writer.WriteEndElement("Name")
11
3047
by: ramu | last post by:
Hi, Suppose I have a string like this: "I have a string \"and a inner string\\\" I want to remove space in this string but not in the inner string" In the above string I have to remove spaces, but not in the inner string(\"and a inner string\\\"). Will anyone please tell me how to do this?
0
1107
by: zaphod42 | last post by:
I've been crunching on this all afternoon: I need to stop text from wrapping at a special character....if you set the innerHTML of some given element without setting the width of said element, it will set the size of the element to the width of the largess single word and wrap at white spaces....I've gotten that taken care of with &nbsp; when I...
1
1662
by: KrishnamoorthyM | last post by:
How to Skip The Enter Key in using python on redhat linux?
7
58497
by: iFuze | last post by:
I've a code which reads the Spotify windows in order to get current song playing. The output is: Spotify - SONGNAME How can I remove "Spotify - " using split?
0
7915
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7841
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8204
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7965
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6617
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5712
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.