473,395 Members | 1,401 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,395 software developers and data experts.

How do I determine if the two rightmost elements of my string are ."

How can I determine if the two rightmost elements of my string are ."
?

Obviously, vb.net has a special use for the double-quote character, so how
do I account for that.

I have...

if microsoft.visualbasic.right(mystring, 2) = ??????? Then
I need to know what to put in place of those question marks.

Thanks,

-Dave
Nov 21 '05 #1
6 1477
Use the EndsWith function of the string. I would recommend not using
anything of the old VB function placed into microsoft.visualbasic.

What character are you looking for? a period? double quotes?

"Dave" <no****@yahoo.com> wrote in message
news:Ot****************@TK2MSFTNGP12.phx.gbl...
How can I determine if the two rightmost elements of my string are ."
?

Obviously, vb.net has a special use for the double-quote character, so how
do I account for that.

I have...

if microsoft.visualbasic.right(mystring, 2) = ??????? Then
I need to know what to put in place of those question marks.

Thanks,

-Dave

Nov 21 '05 #2
My rightmost elements are a period followed by a double-quote. I'll check
out that EndsWith function.

"Marina" <so*****@nospam.com> wrote in message
news:%2******************@TK2MSFTNGP15.phx.gbl...
Use the EndsWith function of the string. I would recommend not using
anything of the old VB function placed into microsoft.visualbasic.

What character are you looking for? a period? double quotes?

"Dave" <no****@yahoo.com> wrote in message
news:Ot****************@TK2MSFTNGP12.phx.gbl...
How can I determine if the two rightmost elements of my string are ."
?

Obviously, vb.net has a special use for the double-quote character, so
how
do I account for that.

I have...

if microsoft.visualbasic.right(mystring, 2) = ??????? Then
I need to know what to put in place of those question marks.

Thanks,

-Dave


Nov 21 '05 #3
Ok, so that would be: If myString.EndsWith(".""") Then

"Dave" <no****@yahoo.com> wrote in message
news:us****************@TK2MSFTNGP10.phx.gbl...
My rightmost elements are a period followed by a double-quote. I'll check
out that EndsWith function.

"Marina" <so*****@nospam.com> wrote in message
news:%2******************@TK2MSFTNGP15.phx.gbl...
Use the EndsWith function of the string. I would recommend not using
anything of the old VB function placed into microsoft.visualbasic.

What character are you looking for? a period? double quotes?

"Dave" <no****@yahoo.com> wrote in message
news:Ot****************@TK2MSFTNGP12.phx.gbl...
How can I determine if the two rightmost elements of my string are ."
?

Obviously, vb.net has a special use for the double-quote character, so
how
do I account for that.

I have...

if microsoft.visualbasic.right(mystring, 2) = ??????? Then
I need to know what to put in place of those question marks.

Thanks,

-Dave



Nov 21 '05 #4
"Dave" <no****@yahoo.com> schrieb:
My rightmost elements are a period followed by a double-quote. I'll check
out that EndsWith function.


You can encode double quotes inside string literals by two consecutive
double quotes, for example:

\\\
MsgBox("He said: ""Hello world!""")
///

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

Maybe is this something when you become complete crazy from all those double
quotes
\\\
Dim a As String = """"""""""""""""""""""""""""""""""""""""""
Dim b As Integer = 0
For Each chra As Char In a
If chra = Chr(34) Then
b += 1
End If
Next
///

Just as idea

Cor

"Dave" <no****@yahoo.com> schreef in bericht
news:us****************@TK2MSFTNGP10.phx.gbl...
My rightmost elements are a period followed by a double-quote. I'll check
out that EndsWith function.

"Marina" <so*****@nospam.com> wrote in message
news:%2******************@TK2MSFTNGP15.phx.gbl...
Use the EndsWith function of the string. I would recommend not using
anything of the old VB function placed into microsoft.visualbasic.

What character are you looking for? a period? double quotes?

"Dave" <no****@yahoo.com> wrote in message
news:Ot****************@TK2MSFTNGP12.phx.gbl...
How can I determine if the two rightmost elements of my string are ."
?

Obviously, vb.net has a special use for the double-quote character, so
how
do I account for that.

I have...

if microsoft.visualbasic.right(mystring, 2) = ??????? Then
I need to know what to put in place of those question marks.

Thanks,

-Dave



Nov 21 '05 #6
Why would you recommend not using Microsoft.Visualbasic functions?

"Marina" wrote:
Use the EndsWith function of the string. I would recommend not using
anything of the old VB function placed into microsoft.visualbasic.

What character are you looking for? a period? double quotes?

"Dave" <no****@yahoo.com> wrote in message
news:Ot****************@TK2MSFTNGP12.phx.gbl...
How can I determine if the two rightmost elements of my string are ."
?

Obviously, vb.net has a special use for the double-quote character, so how
do I account for that.

I have...

if microsoft.visualbasic.right(mystring, 2) = ??????? Then
I need to know what to put in place of those question marks.

Thanks,

-Dave


Nov 21 '05 #7

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

Similar topics

7
by: Venus | last post by:
Hello, I am trying to generate a dynamic form at runtime and would like to do it using "<asp: ..." form elements as follows Build up the string that is placed somewhere in the HTML code the...
1
by: Holger (David) Wagner | last post by:
Hi there, we have an application which is built with several ASCX controls some of which contain form elements (e.g. Textboxes, Buttons etc.) For example: in the top section (one...
4
by: lcifers | last post by:
Is there a way, through VB.NET, to determine if the user has selected this option? I am writing an application that does some string functions to rename files, and the file names get chopped up if...
13
by: coinjo | last post by:
Is there any function to determine the length of an integer string?
0
by: John Harvey | last post by:
I have been struggling with the following: I want to create a class that contains an array of some user-defined type. so I have the following vb code: Public Class Communications Public...
4
by: Jim Carlock | last post by:
Does PHP provide a function to extract the rightmost characters from a string? For example, the VB/ASP equivalent... sStateAbbr = Right$(sCityState, 2) Thanks. Jim Carlock
0
by: Christopher Lusardi | last post by:
Hello, I have a datagridview that is too wide for the form, so I'm trying to put scrollbars on the form and the datagridview table. But, when I run the application, look at the rightmost cells,...
36
by: James Harris | last post by:
Initial issue: read in an arbitrary-length piece of text. Perceived issue: handle variable-length data The code below is a suggestion for implementing a variable length buffer that could be used...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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,...
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
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...

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.