473,788 Members | 2,828 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Show value of string only to sign

Hi

I need function which can show me value of string only TO seted sign.
For example i have string

x="Hello, people"

and i need function which show me string to ",", in this situation
Hello, other example

x="1111 | 22222"

show me only to "|", 1111

Is it possible??

thx

Nov 21 '05 #1
4 1379
Mrozu wrote:
Hi

I need function which can show me value of string only TO seted sign.
For example i have string

x="Hello, people"

and i need function which show me string to ",", in this situation
Hello, other example

x="1111 | 22222"

show me only to "|", 1111

Is it possible??

thx


Dim Answer() as String
1. Answer = String.Split(", ")
Debug.writeline (Answer(0))
2. Answer = String.Split("| ")
Debug.writeline (Answer(0))

Chris
Nov 21 '05 #2
"Mrozu" <gm****@yahoo.p l> schrieb:
I need function which can show me value of string only TO seted sign.
For example i have string

x="Hello, people"

and i need function which show me string to ",", in this situation
Hello, other example

x="1111 | 22222"

show me only to "|", 1111

Is it possible??


Take a look at 'Strings.Split' and the 'String' objects' 'Split' method.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #3
hmm it doesn't work:/
my code:

Dim a As String

a = "ALA|AS"
MsgBox(a.Split( "|"))

it is error in line MsgBox(a.split( "|")) :

An unhandled exception of type 'System.Argumen tException' occurred in
microsoft.visua lbasic.dll

Additional information: Argument 'Prompt' cannot be converted to type
'String'.

What's wrong??

Nov 21 '05 #4
"Mrozu" <gm****@yahoo.p l> schrieb:
Dim a As String

a = "ALA|AS"
MsgBox(a.Split( "|"))

it is error in line MsgBox(a.split( "|")) :

An unhandled exception of type 'System.Argumen tException' occurred in
microsoft.visua lbasic.dll


\\\
Dim Text As String = "ALA|AS"
Dim Words() As String = Text.Split("|"c )
For Each Word As String In Words
MsgBox(Word)
Next Word
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #5

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

Similar topics

12
18235
by: tarmat | last post by:
sorry for this silly little question, but whats the function to grab the sign of a value?
4
14604
by: gimme_this_gimme_that | last post by:
Hi, I Oracle one can have : select to_char(a_id_seq.nextval,'0000') from dual Which fetches a sequence value and pads it with zeros on the left. When the sequence value is more than 4 digits '####' is returned.
2
1874
by: Sheldon Simms | last post by:
I would like to portably extract the components of a floating point value: sign, exponent, and significand. Based on the C floating point model described in 5.2.4.2.2, I came up with the following code. There are a couple of things to note about this code. 1) I convert the significand to an integer value in which the least significant bit(s) of the integer correspond/s to the least significant digit of the significand. This means that...
3
3988
by: Ipsita | last post by:
Hi, I am explaining the scenario of what I am trying to do: - I have a webform with some controls, from which I am taking the data. eg say Username, password - I am passing these data as parameters to the web service method result = serviceproxy.VerifyUser(username, password) on the event of the "Submit" button_click. - The webservice webmethod uses the username, password to verify if the user is valid user. If no, it sends an error...
10
1756
by: Niron kag | last post by:
Hello! I want to give a value with the sign \ to a string variable. The problem is that the program always add the sign @ before the variable. The next line gives me : @"Name\shai" string str = "Name\\shai"; I want str to be only: "Name\shai" . How can I do it? Thanks in advance.
2
1795
by: lauralucas | last post by:
Hello I'm trying to use a connection string stored in web.config here is the web.config part <appSettings> <add key="NDDbase" value="Server=SOMESERVER\\SOMEINSTANCE;integrated security=SSPI;database=NDD"/>
130
6640
by: Daniel Manes | last post by:
I'm baffled. I have a column in a SQL Server Express database called "Longitude," which is a float. When I view the table in a DataGridView, some of the numbers, which only have two decimal places in the database show up with *15* decimal places and are ever so slightly off (in the example in the subject line, by about 2E-15). I'm not doing any operations on this column. It's just running a stored procedure which performs a pretty basic...
14
5551
by: Jim Langston | last post by:
The output of the following program is: 1.#INF 1 But: 1.#INF 1.#INF was expected and desired. How can I read a value of infinity from a stream?
6
1302
KalariaNitya
by: KalariaNitya | last post by:
hello all, i need ur help.. i have 10 combobox & 10 textbox on windows forms it's names like : cmbsign1 txtdiscount1 cmbsign2 txtdiscount2
0
9656
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10366
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10112
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,...
0
9969
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7518
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5399
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...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3675
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.