473,803 Members | 4,139 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.visua lbasic.right(my string, 2) = ??????? Then
I need to know what to put in place of those question marks.

Thanks,

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

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

"Dave" <no****@yahoo.c om> wrote in message
news:Ot******** ********@TK2MSF TNGP12.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.visua lbasic.right(my string, 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******** **********@TK2M SFTNGP15.phx.gb l...
Use the EndsWith function of the string. I would recommend not using
anything of the old VB function placed into microsoft.visua lbasic.

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

"Dave" <no****@yahoo.c om> wrote in message
news:Ot******** ********@TK2MSF TNGP12.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.visua lbasic.right(my string, 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.EndsWi th(".""") Then

"Dave" <no****@yahoo.c om> wrote in message
news:us******** ********@TK2MSF TNGP10.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******** **********@TK2M SFTNGP15.phx.gb l...
Use the EndsWith function of the string. I would recommend not using
anything of the old VB function placed into microsoft.visua lbasic.

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

"Dave" <no****@yahoo.c om> wrote in message
news:Ot******** ********@TK2MSF TNGP12.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.visua lbasic.right(my string, 2) = ??????? Then
I need to know what to put in place of those question marks.

Thanks,

-Dave



Nov 21 '05 #4
"Dave" <no****@yahoo.c om> 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.c om> schreef in bericht
news:us******** ********@TK2MSF TNGP10.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******** **********@TK2M SFTNGP15.phx.gb l...
Use the EndsWith function of the string. I would recommend not using
anything of the old VB function placed into microsoft.visua lbasic.

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

"Dave" <no****@yahoo.c om> wrote in message
news:Ot******** ********@TK2MSF TNGP12.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.visua lbasic.right(my string, 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.Visua lbasic functions?

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

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

"Dave" <no****@yahoo.c om> wrote in message
news:Ot******** ********@TK2MSF TNGP12.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.visua lbasic.right(my string, 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
3588
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 same way like regular input fields can. strForm = "<form name=""myForm"" runat=""server"">" & vbCrLf strForm += "<asp:button name=""myName"" .... runat=""server"" />" & vbCrLf
1
1882
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 ascx-control), there is a textbutton in which the user can enter a string to search for. There's link button right next to that textbutton. Then, in the "content section" (another ascx-control), there may be a login-dialog which prompts the user for...
4
9725
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 the expected extension is not returned. I can write another function to get around this, but if there is a clean way to determine the state of that toggle I would rather do that. I may need this again in the future and don't want to always...
13
3660
by: coinjo | last post by:
Is there any function to determine the length of an integer string?
0
2041
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 PhoneInfo() As ACORD.PhoneInfo End Class Public Class PhoneInfo Public PhoneNumber As String
4
9260
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
1182
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, and click on one of the rightmost cells the form scrolls to the leftmost end of the datagridview. I tried various permutations of the form's autoscroll, the datagridview's scrollbars, and the datagridview's selection mode without success. What do...
36
3821
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 to read text or handle arrays of arbitrary length. I don't have the expertise in C of many folks here so I feel like I'm offering a small furry animal for sacrifice to a big armour plated one... but will offer it anyway. Please do suggest...
0
9562
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,...
0
10542
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
10289
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
9119
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, 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...
1
7600
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
5496
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...
1
4274
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
2
3795
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2968
bsmnconsultancy
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...

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.