473,545 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

trim start and trailing space chars from string

Hi,
is there something corresponding to the java String.trim() method, ie
trim start and trailing space/tab chars from string?
say convert " asdf " to "asdf"?

Thnx
Sep 15 '07 #1
1 123161
On Sep 15, 7:24 pm, Konstantinos Pachopoulos <kostaspa...@ya hoo.gr>
wrote:
Hi,
is there something corresponding to the java String.trim() method, ie
trim start and trailing space/tab chars from string?
say convert " asdf " to "asdf"?
http://docs.python.org/lib/string-methods.html
Sep 15 '07 #2

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

Similar topics

1
9025
by: aa | last post by:
Anybody know the solution to trailing space in argument of Runtime.getRuntime().exec(arg), Process p = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler C:\\Documents and Settings\\XX\\Desktop\\- Copy of TestingFolder -\\jjjj hihi.doc"); where there is 2 space between dash and "Copy of TestingFolder", but after going...
11
4721
by: Reply Via Newsgroup | last post by:
Folks, In PHP and some other scripting languages, one has trim() - It removes newline, tabs and blank spaces that might prefix, or suffix a string. Can someone tell me how I can do this in javascript? Much appreciated, randell d.
5
33285
by: Alex Vassiliev | last post by:
Hi all. Just wanted to share two handy RegEx expressions to strips leading and trailing white-space from a string, and to replace all repeated spaces, newlines and tabs with a single space. * JavaScript example: String.prototype.trim = function() { // Strip leading and trailing white-space
3
10680
by: Andy B | last post by:
I've tried using Trim or RTrim to strip trailing space characters from my data. When I check on the transformed data space characters are still there. We have an address table containing two fields: BuildName and RoadName. Both have the following properties: size 50, not indexed, not required, allowed zero length. Some records have...
3
4526
by: Mark Urish | last post by:
I want to center-align the text in 2 Label controls, and I want the 1st char of their text to line up ------------------------------------------------------------------------------ label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter label1.Text = "IDLE"; //4 char...
3
1904
by: garyusenet | last post by:
In my continuing education regarding string manipulation, can someone advise me how to take any trailing spaces, and commas from a string. these strings are comming from the streamreader for instance. string 1 = 'abcd '
3
5812
by: Paul | last post by:
Hi, My RichTextBox has multiple lines of text. Most of the lines unfortunately end with a space. Is it possible to replace the space and NewLine/Line Feed with just the NewLine/LineFeed? So in essence just removing the trailing space from each line?
1
4420
by: deerchao | last post by:
I used these codes to provide a default "Save As" filename for browsers: Response.AppendHeader("Content-Disposition", "attachment; filename=" + fileName); Response.ContentType = "application/octet-stream"; But if there are space chars in the file name, FireFox would split the recommed file name, and use the first part only. For example,...
6
2995
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, I think in built-in C/C++ functions, there is no direct function call to trim heading and trailing space characters, right? So, we have to implement it manually by iterating the string to check character one by one. Support not using MFC.
0
7502
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
7692
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
7946
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
7457
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
7791
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...
1
5360
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
5078
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...
0
3491
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
744
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.