|
by: Paul E Collins |
last post by:
Given a string variable (form input), how can I determine whether it
represents a valid integer?
is_numeric is true for floats as well as integers, and is_int always
fails on a string.
P.
|
by: __PPS__ |
last post by:
Hello,
I have a function that does some decoding (same as urldecode in php)
and it returns std::string
std::string urldecode(const char* in, std::size_t length);
so, this function parses input and constructes output char by char. I
tried to use all sorts of direct access to the buffer of std::string to
be returned but it's always slow. It appered that if I dynamically
allocate memory fill it with output, then create std::string from this...
|
by: Olivier Bellemare |
last post by:
I've tried to make a function that returns the middle of a string. For
example:
strmid("this is a text",6,4); would return "is a".
Here is my code:
char *strmid(char *texte, int depart, int longueur)
{ char *resultat = " ";
char *temporaire = " ";
int nbr;
|
by: Yang Lee |
last post by:
hi
is this correct
char teststr="\0";
or is there another method to initialise;
thanks
lee
|
by: Opa |
last post by:
I have a string with n number of characters. I'm trying to create another string which is exactly 12 characters having leadings zeros and the input string at the end
ex: string1 = "7344", I want to format string1 such that it results another string with string1 at the end and leading zeros in front of it like: "000000007344
so I try string2=String.Format(??????,string1
does anyone know the correct formatting expression
Thank
|
|
by: Ben |
last post by:
Hi
I have a string which is at least 4 characters but can be more which I need
to pad, with zeros, to a full length of 15 after the 3rd charactor.
Eg '1234' to '123000000000004'
How can I do this?
Also how can I truncate this back to 4 or however many charactors (e.g.
|
by: karthi |
last post by:
hi,
I need user defined function that converts string to float in c.
since the library function atof and strtod occupies large space in
my processor memory I can't use it in my code.
regards,
Karthi
|
by: Rich Raffenetti |
last post by:
How can one format an integer into a hex string with leading zeros? Suppose
an integer is 512 which in Hex is 200. I wish to print the 4-byte integer
as 0200 or even 0x0200. The HEX function doesn't create leading zeros. The
Format function (format(value,"X") doesn't create leading zeros.
I believe there should be a simple way that doesn't involving measuring and
padding the string.
|
by: ram23 |
last post by:
Hi friends,
i need help ..
i am getting String value and i need to add leading zeros..
total length of Target string is 13char
eg: suppose if i get 12 as values..
it needs to convert into 0000000000012
|
by: =?Utf-8?B?SExvbmc=?= |
last post by:
Could someone give a hand on how to handle this issue: I need to find a way
of removing zeros from files names. The zeros in the names are used to sort
the file name, e.g. MAK0080.pci, MAK-0080.pci. What I need to do is to
remove the zeros, so the file names become MAK80.pci o MAK-80.pci. I have
done something in Visual Basic using the Mid() function and going thru the
string removing the zeros. Is there a better way of doing this,...
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
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: 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...
|
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...
|