Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Requested My String library, so here it is with other library things

Author
Message
ironhoof
15
Years of Service
User Offline
Joined: 3rd Sep 2002
Location:
Posted: 25th Nov 2002 08:53
As requested my string library! Part of CS-LIBRARY 2002
CS-LIBRARY 2002 contains all you see here plus many many many more! contains 156 librarys all usefull and alot of original functions that I created out of my own design.
If anyone would like to reserve a copy of the finished CerveSoft-LIBRARY 2002 for absolutely nothing its freeware just e-mail me at ironhoof2@wmconnect.com and when its done I'll e-mail it out

My ADVANCED TIMER LIBRARY


My data Type conversion library
-----\
There was a man on the stairs that wasn't there.
He wasn't there agian today I think he's from the CIA.
ironhoof
15
Years of Service
User Offline
Joined: 3rd Sep 2002
Location:
Posted: 25th Nov 2002 08:56
OOOPZ! lets try that agian!

TIMER LIBRARY

`CS-LIBRARY 2002 Russel "IronHoof" Hamrick



STRING LIBRARY





CONVERSION LIBRARY



-----\
There was a man on the stairs that wasn't there.
He wasn't there agian today I think he's from the CIA.
ironhoof
15
Years of Service
User Offline
Joined: 3rd Sep 2002
Location:
Posted: 25th Nov 2002 09:25
EXPLANATION OF STRING LIBRARY:

Instr()
This command returns the first accurance of a character in a string

print Instr("Hey there","y")

output
3

--------------------------------------

Rtrim$()
This command remove unwanted spaces from the right of the string

Print RTRIM$("HEY THERE! ")+"<"

output
HEY THERE!<

---------------------------------------------------------
LTRIM$()
same as RTRIM$ but removes unwanted spaces from the left of the string

print ">"+Ltrim$(" HEY THERE!")

output
>HEY THERE!

-------------------------------------------------------
ATRIM$() dose the combined function of RTRIM AN LTRIM
removing all spaces from left and right of the string

pint ">"+Atrim$(" HI ")+"<"

output
>HI<

-------------------------------------------------------

CutLeft$()
This HANDY function is simulare to LEFT$ and RIGHT$ except it litterly CUTS from the specified character you say at its first accurance! instead of using a number

print CutLeft$("OPEN|HERE" , "|")

output
OPEN

--------------------------------------------------------
CutRight$()
This dose the reverse of cutleft itcuts from the right of the first accurance of a character specified

print CutRight$(" THIS|GUY " , "|")

output
GUY

--------------------------------------------------------
CutMiddle$()
dose the combined function of cutleft and right by using TWO
character accurances!

print CutMiddle$( " PRINT(PARAMETER) " , "(" , ")" )

output
PARAMETER
-------------------------------------------------------
FindWord$()
is simulae to Instr only it will only return the place
of the first accurance of a MATCHING word in case in the string

Print FindWord$("HEY HI HOWDY COOLIES","HOWDY")

output
8 -Cause HOWDY begins in character space 8 of the searched string

---------------------------------------------------------
DeleteWord$()
This seeks out a matching word in a string and destroys it!

print DeleteWord$("WHATS UP HERE MY FRIEND?" , "HERE ")

output
WHATS UP MY FRIEND? - We use a space after the word we delete because you will have a double space since it removes whatever matches and the spaces between the world would else wise remain like so

alternate output
WHATS UP MY FRIEND?

--------------------------------------------------------
Insert$()
This will insert a word in a string at the specified location

print Insert$("CAN BELIEVE THIS GUY?","YOU ",5)

output
CAN YOU BELIEVE THIS GUY?
---------------------------------------------------------

CountChar()
this counts the number of the specified char in the string

print CountChar(" HEY MIKE HOW IS IT GOING","E")

output
2
----------------------------------------------------
FindTrail$()
This finds thee FIRST ACCURANCE of TRAILING characters in a string! which is aything over double characters in a row!
IT RETURNS THE LOCATION AND LENGTH of the TRAIL at the same time! "use cutleft and right to seprate the values"

print FindTrail$("HEY THERE AL.....")

output
13|5 -which is at position 3 and is 5 .'s long
--------------------------------------------------------
Trail$()
this will create a trail string

print Trail$("R",6)

output
RRRRRR
----------------------------------------------------
GetStringDex()
this function will retrieve the numberic value of a word in a STRING INDEX "which must be seprated by a single character throughout"

A$="HEY;BOB.BMP;SNIFF;STOP;HOOF;SHINE;SLEEK"

print GetStringDex(A$,";","STOP")

output
4 - Cause stop is the 4th word in the stringdex
---------------------------------------------------------
StringDex$()
this retireves a word from the string index

A$="HEY;BOB.BMP;SNIFF;STOP;HOOF;SHINE;SLEEK"

print StringDex$(A$,";",5)

output
HOOF
----------------------------------------------------------

-----\
There was a man on the stairs that wasn't there.
He wasn't there agian today I think he's from the CIA.
DrakeX
15
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 25th Nov 2002 23:31
umm just so people know, some of the functions use the & operator, and if they want it to work in DBP they have to change & to && ... rather annoying how that's changed :

i'm looking at yooooou!
MrTAToad
15
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th Nov 2002 14:07
Are you going to stick this into a C DLL for intergration into DBPro ?

Good news everybody! I really am THAT good...
ironhoof
15
Years of Service
User Offline
Joined: 3rd Sep 2002
Location:
Posted: 29th Nov 2002 07:18
Can't, I do not own a c++ compilier for windows that can output windows progras or dynamic linked libraries which really bites.. =( anyone know any TRUELY free compiliers that can?

-----\
There was a man on the stairs that wasn't there.
He wasn't there agian today I think he's from the CIA.
TheCyborg
15
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 29th Nov 2002 09:47
Here is a link to Borlad's Free C++ Compiler and instructions:
http://www.dc.peachnet.edu/~jbenson/csci1401/freecpp.htm

TheCyborg Development.
http://TheCyborg.Amok.dk
The Ultimate Source To DarkBASIC Programming.
MrTAToad
15
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 29th Nov 2002 11:16
I've got a 'INSTR' plug-in (although I call it something else), on my web site - it finds the first occurance or a word or letter.

Good news everybody! I really am THAT good...
Timpuktu
15
Years of Service
User Offline
Joined: 6th Oct 2002
Location:
Posted: 29th Nov 2002 13:21
http://www.bloodshed.net/dev/devcpp.html
Free C++ compiler that can make DLLs.
-Timpuktu

System specs: AMD 500MHz, 196MB, GeForce 2 MX 400
10GB HD, Sound Blaster Live! Value, Windows 98 SE

Login to post a reply

Server time is: 2018-08-21 03:26:01
Your offset time is: 2018-08-21 03:26:01