Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.

StringsEx library

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-24-2008, 06:50 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default StringsEx library

I have put all the .NET string handling that seemed relevant and that was not already implemented in B4PPC in this library. I've also provided access to a .NET StringBuilder that efficiently concatenates large numbers of strings. Help and (sort of) demo app included. Should work on .NET 1.0 and 2.0 and desktop and device.

If I have missed any string operation that anyone thinks might be useful then let me know.

EDIT :- Source code for merging dlls posted. PLace in the Basic4ppp Desktop\Libraries folder.
Attached Files
File Type: zip StringsEx1.1.zip (12.7 KB, 621 views)
File Type: zip StringsExSource1.1.zip (979 Bytes, 341 views)

Last edited by agraham : 05-28-2008 at 01:45 PM.
Reply With Quote
  #2 (permalink)  
Old 03-24-2008, 07:56 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,689
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Thanks Agraham.
This is a very useful library as most programs deal with strings in one way or another.
Reply With Quote
  #3 (permalink)  
Old 05-28-2008, 01:46 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Source code for merging dll posted in original post.
Reply With Quote
  #4 (permalink)  
Old 01-04-2009, 03:43 AM
Basic4ppc Veteran
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 223
Send a message via MSN to tsteward
Default

It seems your help file is incorrect.
Quote:
Mid(oldstring As String, newlength As Int32, startchar As Int32)
Unless I am mistaken (probably I am) it should be
Quote:
Mid(oldstring As String, startchar As Int32,newlength As Int32,)
__________________
PC: Dual core 3.4ghz 2gb ram
PPC: I-mate Jasjam
Reply With Quote
  #5 (permalink)  
Old 01-04-2009, 10:16 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by tsteward View Post
Unless I am mistaken (probably I am) it should be
No you are not. You are right ,the help is wrong
Reply With Quote
  #6 (permalink)  
Old 09-26-2009, 12:47 PM
Basic4ppc Expert
 
Join Date: Apr 2009
Posts: 503
Default



This just keeps getting better and better

Thanks for this
Reply With Quote
  #7 (permalink)  
Old 12-05-2009, 01:36 PM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 810
Awards Showcase
Beta Tester 
Total Awards: 1
Default

I've just been successfully using StringsEx.dll (v1.1).

The IDE offers StringBuilder method "ToString2" but this is not mentioned in the DLL Help.

Is it interesting? ("Dispose" isn't mentioned either but that's rather obvious.)

Cheers, Mike.
Reply With Quote
  #8 (permalink)  
Old 12-05-2009, 02:09 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

All .NET objects have a ToString method and many have a Dispose method.

ToString is useful on the actual .NET object on the desktop as it often returns useful information. On the device it is less useful as it usually only returns the class name for space economy reasons. However as libraries hold their underlying .NET objects (if any) as Value or ControlRef properties you can't call ToString on them in Basic4ppc except by using the Door library. The library ToString will usually only return the class name of the library object so is of little use.

Dispose, if present, is used by Basic4ppc but in general should not be used by a Basic4ppc program except perhaps on Bitmaps but now ImageLibEx makes that unnecessary.

In StringBuilder I chose to overide the default ToString to return the contents of the StringBuilder rather than the class name of the library StringBuilder object. However I didn't expect Basic4ppc to pick up the original (and I am not sure why it does) as ToString2 which just returns the class name - so no, it's not much use.

For completeness I also got the scope of the underlying "version" field wrong so it is visible to though unusable by Basic4ppc. This field is what the DllVersion property returns.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #9 (permalink)  
Old 12-05-2009, 03:05 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,689
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You need to add 'override' to the ToString method declaration. Otherwise your ToString will not replace the base method (which is actually overloading rather than overriding).
Reply With Quote
  #10 (permalink)  
Old 12-05-2009, 03:37 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Erel View Post
You need to add 'override' to the ToString method
Thanks Erel. I (wrongly) thought that hiding it would (in this case) be much the same as overriding it in that it would make the base class member invisible. As it doesn't I'm obviously missing something in my understanding of what is actually happening. Leaves to read and ponder!
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Door library (Beta) - Special library Erel Official Updates 60 01-13-2011 11:23 AM
Merging Outlook library and Phone library Erel Official Updates 11 09-15-2010 09:22 AM
PhoneticAlgorithms Library (ex-StringComparison Library) moster67 Additional Libraries 10 11-11-2008 07:46 PM


All times are GMT. The time now is 10:30 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0