|
by: Charles Erwin |
last post by:
Is there any way, upon scanning in a file line by line to avoid
missing the last line if there is not a newline character (aka you
have to hit return on the last line of input in your file). I was
sure that there was a way around it but it escapes me if there is one.
Thanks
Charles Erwin
|
by: William Payne |
last post by:
Hello, I need to write a program that opens a text file and scans the entire
file for a specific line and when that line is found, a particular word on
that line is to be replaced. The new word is given as an argument to the
program. I wrote a small test program that doesn't work because strcmp()
fails to find a matching line. Here's the code:
#include <stdio.h>
#include <string.h>
int main(int argc, char** argv)
|
by: Etu |
last post by:
Hi,
I have a string:
string c = "'abc' \"cde\", 'mno' \"xyz\",";
how can I use the c.Replace(???, ???) method to have this string:
"'abc' "cde", 'mno' "xyz","
that is, all the backslashes are removed.
|
by: Marty |
last post by:
Hi,
I would like to replace "\r\n" by "_" within a specific string.
I tried :
strMyString.Replace('\r', '_');
strMyString.Replace('\n', '_');
or
strMyString.Replace(System.Environment.NewLine, '_');
|
by: Neo Geshel |
last post by:
Greetings
I am using VB in my ASP.NET project that uses an admin web site to
populate a database that provides content for a front end web site. I am
looking for a way to use replace() to replace multiple entries of an
object within a string. That is, if a user hit twice to create
one new line, but just once to create another, I want both types
( & twice
to create a new line (by creating a blank line between paragraphs). ...
|
|
by: Chris Anderson |
last post by:
Anyone know of a fix (ideally) or an easy workaround to the problem of escape characters not working in regex replacement text? They just come out as literal text
For example, you'd think that thi
Regex.Replace("<stuff>text</stuff>", "<stuff>", "<stuff>\n"
would give yo
<stuff
text</stuff
|
by: runningdog |
last post by:
Hi,
I would like to be able to embed a newline in a text string.
Is there any convienent notation to do this
TIA Steve
|
by: jpierson |
last post by:
Hi,
I'm having a few problems with the replace function for replacing
characters in a textbox.
"C:\" is the string i am tryin to remove ,with it a command I am
sending does not work.
txtS_Filename.Text.Replace("C:\", "");
The compiler has a problem with the newline slash character but even
|
by: dkirkdrei |
last post by:
I am having a bit of trouble trying to double up on slashes in a file
path. What I am trying to do is very similar to the code below:
<?
$var = "\\wusais\Intranets\Intranets\fpdb\pdf\weinig\00505882.pdf";
$new = preg_replace("\\", "\\\", "$var");
?>
Code above produces the following error:
|
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...
|
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
|
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 most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|