|
by: usgog |
last post by:
I need to implement a function to return True/false whether String A
contains String B. For example, String A = "This is a test"; String B =
"is is". So it will return TRUE if String A includes two "i" and two
"s". The function should also handle if String A and B have huge
values, like two big dictionary.
What's the best approach to achieve this with the best performance?
what's the Big O then?
I am thinking to put A and B into two...
|
by: francescomoi |
last post by:
Hi.
I'm trying to remove some characters within a string and substitute
others. For instance, I want to convert:
John's new house, great ---> Johns-new-house-great
I tried with:
----------------//------------------
int main()
{
|
by: Jason Gleason |
last post by:
What's the most efficient way to get the number of occurences of a certain
string in another string..for instance i'm using the following code right
now...
private int CharacterCounter(String text,String Character)
{
int count = 0;
|
by: thomaz |
last post by:
Hi....
There is a string method to count the total number of a
specified character in a string.
EX: count the total of (*) in a string
*** Test ***
Thanks....
|
by: Chris Simmons |
last post by:
I know that a String is immutable, but I don't understand why this
piece of code fails in nUnit:
// BEGIN CODE
using System;
class Test
{
public static void Main( String args )
|
|
by: Jon |
last post by:
I want to count the number of instances of a certain string(delimiter) in
another string. I didn't see a function to do this in the framework (if
there is, please point me to it). If not, could someone let me know if the
method I've used below is efficient or if there is a better way to do it, as
these will be rather large strings I'm searching in. Thanks
Public Shared Function CountDelimiter(ByVal strInput As String, ByVal...
|
by: jan axelson |
last post by:
My application is using RegisterDeviceNotification() to detect
attachment and removal of a USB HID-class device.
The form is receiving WM_DEVICECHANGE messages with wParam set to
DBT_DEVICEARRIVAL or DBT_DEVICEREMOVECOMPLETE.
I want to identify the device that has arrived or been removed by
examining the dbcc_name member of the DEV_BROADCAST_DEVICEINTERFACE
structure.
|
by: Oenone |
last post by:
Is it possible to create an object which can have methods and properties,
but which can also be treated as a string?
I'm trying to create a wrapper around the IIS Request.Form object which
behaves the same as the classic ASP object behaved. This will allow me to
quickly get a large amount of code up and running (I can then tweak it to
not require this wrapper at a more leisurely pace).
When queried directly, this object returns a...
|
by: Kuups |
last post by:
Hi!
I have a question regarding the count if character within a string
like for example I have a string of
e.g.
123#123#
I would like to determine what is the code? of getting the # sign
|
by: senfo |
last post by:
I realize it's Friday and I'm probably already on vacation for the
remainder of the day; but, I have a really, really stupid question. Is
there a bug in the .NET 2.0 Framework in regards to the LastIndexOf()
method or am I just not understanding something that should be obvious?
string myString = "This is a test";
int index = myString.LastIndexOf(' ', 0, 6);
The second line throws an ArgumentOutOfRangeException exception, which
says,...
|
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...
|
|
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: 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: 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: 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
|