473,626 Members | 3,265 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Clear spaces between tex

Jan
Hallo,

How can i Clear empty spaces between text.
For example:

I've got the name "Justin Name" in a string and want to clear de spaces
between de names so i will get "JustinName ".

What can i use to do that?

TIA Jan
Dec 4 '06 #1
3 1180
guy
use the VB 'Replace' function

newString = Replace(myStrin g," ","")

hth

Guy
"Jan" wrote:
Hallo,

How can i Clear empty spaces between text.
For example:

I've got the name "Justin Name" in a string and want to clear de spaces
between de names so i will get "JustinName ".

What can i use to do that?

TIA Jan
Dec 4 '06 #2
Try

Replace("Justin Name", " ", "")

Fred
Jan wrote:
Hallo,

How can i Clear empty spaces between text.
For example:

I've got the name "Justin Name" in a string and want to clear de spaces
between de names so i will get "JustinName ".

What can i use to do that?

TIA Jan
Dec 4 '06 #3
On Mon, 4 Dec 2006 13:59:48 +0100, Jan wrote:
Hallo,

How can i Clear empty spaces between text.
For example:

I've got the name "Justin Name" in a string and want to clear de spaces
between de names so i will get "JustinName ".

What can i use to do that?

TIA Jan
You can also try this:

imports System.Text.Reg ularExpressions

newString = Regex.Replace(o ldString,"\s+", "")

This way has the added benefit that it also takes care of tabs

--
Bits.Bytes
http://bytes.thinkersroom.com
Dec 4 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
11188
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 --------------------------
6
1921
by: ima | last post by:
http://www.kencoffman.com/templates.htm I've been experimenting with float:left and I've been able to clear those floats as far as Opera 8.02 and Firefox 1.0.6 but IE6 is a problem. I've researched a bit and read about a hack but for some reason I've been unable to get it to work. Perhaps I've missed some subtle requirement like placed it in the wrong place in my css file. If you view the page with Opera or Firefox, you'll notice...
10
11108
by: cppdev | last post by:
Hi All! I want to clear the string contents from sensitive information such as passwords, and etc. It's always a case that password will appear as string at some point or another. And i feel uneasy leaving it hanging in memory indefinitely (especially in case when string is Interned). So at leats for the case when string is not interned i propose:
7
3134
by: Eduardo78 | last post by:
Hello everybody, I heard I could clear (or move spaces) to all controls at ones without having to call each one of them. If someone remembers how to do that, I will apreciate your help. My scenario is a form where I have multiples groupboxes, and in each of those groups i have text boxes, where users enter data. And I want to have an option where the user can clear the controls in particular group at once. And I do not want to be...
4
10563
by: Dhans | last post by:
Hi there, I am using log4net in my (.net v1.1) application to log the messages. I tried to clear the logfile while application is running. since log4net has the file handle it did not allow me to clear/delete the file. I need to clear the content of the log file specified in the log4net configuration file, when it is needed in the application(such as some button click event), If anybody familiar with log4net your help would be...
4
7687
by: Brett Romero | last post by:
I fill a DataTable with search results, which take a very long time if I first clear it. The values come from an object and I map them into the corresponding table columns. I may have 65000 results. I iterate through them, create a new row, fill it, and add it to the DataTable for each interation. This works fine on the first search. Before each search, I call DataTable.Clear() and do the above process. Every search after the first...
5
2614
by: =?Utf-8?B?UmljaA==?= | last post by:
The output window gets filled with stuff while I am debugging my app. Is there a way to programmatically clear the output window? I have read that there is currently no explicit method to do this in VS.Net. I vaguely recall reading something about adding a bunch of spaces at the top of the window to push everything down and then place the cursor at the top left corner of the output window. How to do this? Or is there a method now? ...
6
12950
by: Alexander Vasilevsky | last post by:
How to clear the screen in the console application in Microsoft Visual C #. NET 2003. http://www.alvas.net - Audio tools for C# and VB.Net developers + Christmas discount
6
7794
by: Lambda | last post by:
For a std::vector, what's the difference between the clear() function and its destructor? I know their usages are different, but how about their implementations?
0
8265
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8705
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7193
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5574
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4197
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2625
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
1
1808
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.