Results 1 to 3 of 3

Thread: Shortcut to 2 Setpes in Text Trim

  1. #1

    Thread Starter
    Addicted Member Codehammer's Avatar
    Join Date
    Aug 2004
    Posts
    164

    Shortcut to 2 Setpes in Text Trim

    Dim Filename as string= "(Internet Explorer\Dap)"
    VB Code:
    1. Filename = Process.GetCurrentProcess.ToString.Substring(Process.GetCurrentProcess.ToString.LastIndexOf("(") + 1)
    2. Filename = Text.Remove(Text.Length - 1, 1)

    is there a way of making this one

    Tried this:
    VB Code:
    1. Filename = Process.GetCurrentProcess.ToString.Substring(Process.GetCurrentProcess.ToString.LastIndexOf("(") + 1).tostring.Remove(Text.Length - 1, 1)

    But it didn't work!!!
    Curiosity SKILLED the cat
    Google Talk from your Mobile phone

    Chat from your mobile or get an emulator like J2ME Wireless Toolkit 2.2

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Shortcut to 2 Setpes in Text Trim

    What exactly are you trying to achieve? Is this an ASP.NET app? You might want to look at things like IO.Path and the String.Trim overload list.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Addicted Member Codehammer's Avatar
    Join Date
    Aug 2004
    Posts
    164

    Re: Shortcut to 2 Setpes in Text Trim

    No, I wanted the Result of "(Internet Explorer\Dap)" to be "Dap". Just Substring Manipulatioin. Figured Out to use & in the end of the Fisrt one works.
    Curiosity SKILLED the cat
    Google Talk from your Mobile phone

    Chat from your mobile or get an emulator like J2ME Wireless Toolkit 2.2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width