|
by: Simon |
last post by:
Hi,
I have written a function to trim char *, but I have been told that my way
could be dangerous and that I should use memmove(...) instead.
but I am not sure why my code could be 'dangerous' or even why there could
be a problem.
here is the code
////////
|
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
|
by: Robert Mark Bram |
last post by:
Hi All,
I am using the following trim function:
function trim (str) {
return str.replace(/^\s*/g, '').replace(/\s*$/g, '');
}
The problem is that this doesn't trim instances of the " " char -
the non breaking space. Can this be represented in a grep statement at
|
by: FlyerN87 |
last post by:
For some reason this command will not trim the names shown in the
fields listed. I'm trying to do this in a text box on a report. I've
done this fairly succesfully in other reports but I must have done
something wrong here....
I've tried both of these...
=Trim( & )
=Trim( &", "& )
|
by: Darren Anderson |
last post by:
I have a function that I've tried using in an if then statement and I've
found that no matter how much reworking I do with the code, the expected
result is incorrect.
the code:
If Not (strIn.Substring(410, 10).Trim = "") Then
'Something processed
Else
'Something processed
|
|
by: Sascha Herpers |
last post by:
Hi,
what is the difference between the trim function and the trim
String-member?
As far as I see it, both return the trimmed string and leave the
original string unaltered.
Is any of the two faster? Is there a general rule/opinion to prefere
members over functions?
Thanks for any hint.
|
by: Terry Olsen |
last post by:
I have an app that makes decisions based on string content. I need to make
sure that a string does not contain only spaces or newlines. I am using the
syntax 'Trim(String)" and it works fine. I thought I'd change it to the VB
..NET method "String.Trim" but that throws an object exception.
Which brings the question: is it compliant to use...
|
by: arsaral |
last post by:
Hi,
Here is an extension of MSDN's trim right example to trim left-right...
First subroutines then the calling structure is given below...
Cheers.
Ali Riza SARAL
//*************************************************************
|
by: rkk |
last post by:
Hi,
I've written a small trim function to trim away the whitespaces in a
given string. It works well with solaris forte cc compiler, but on
mingw/cygwin gcc it isn't. Here is the code:
char *trim(char *s)
{
char *begin,*end;
begin = s;
|
by: Keith Thompson |
last post by:
Kevin Smith <no@spam.comwrites:
You posted this to microsoft.public.dotnet.languages.csharp, where I
presume it's topical. Why on Earth did you redirect followups to
comp.lang.c?
Anyone else replying to Kevin Smith's article, please *ignore* the
Followup-To header and post only to the csharp group. Thanks.
|
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...
|
|
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. ...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
|