473,406 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 1363
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.pl> 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.ArgumentException' occurred in
microsoft.visualbasic.dll

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

What's wrong??

Nov 21 '05 #4
"Mrozu" <gm****@yahoo.pl> 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.ArgumentException' occurred in
microsoft.visualbasic.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
by: tarmat | last post by:
sorry for this silly little question, but whats the function to grab the sign of a value?
4
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...
2
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...
3
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...
10
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 =...
2
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...
130
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...
14
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
jinu1996
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...
0
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...
0
agi2029
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,...
0
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...

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.