strings/ substr.bi | |
License | Copyright © 2009, FreeBASIC Extended Library Development Group |
ext. strings | |
Functions | |
SubStr | Returns a portion of a string. |
SubStr | Returns a portion of a string. |
SubStrCompare | Compares a substring with another. |
SubStrCompare | Compares a substring with another. |
SubStrCount | Finds the number of substrings within a string. |
SubStrCount | Finds the number of substrings within a portion of a string. |
SubStrReplace | Replaces a substring with another. |
SubStrReplace | Replaces a substring with another. |
Copyright © 2009, FreeBASIC Extended Library Development Group
Distributed under the FreeBASIC Extended Library Group license. See accompanying file LICENSE.txt or copy at http://code.google.com- /p- /fb-extended-lib- /wiki- /License
Functions | |
SubStr | Returns a portion of a string. |
SubStr | Returns a portion of a string. |
SubStrCompare | Compares a substring with another. |
SubStrCompare | Compares a substring with another. |
SubStrCount | Finds the number of substrings within a string. |
SubStrCount | Finds the number of substrings within a portion of a string. |
SubStrReplace | Replaces a substring with another. |
SubStrReplace | Replaces a substring with another. |
declare function SubStr overload ( byref subject as const string, byval offset as integer = 0 ) as string
Returns a portion of a string.
subject | the string to return a portion of. |
offset | zero-based offset of substring. if negative, specifies (-offset) chars from the end of the string |
The portion of the string following the offset passed.
declare function SubStr ( byref subject as const string, byval offset as integer, byval length as integer ) as string
Returns a portion of a string.
subject | the string to return a portion of. |
offset | zero-based offset of substring. if negative, specifies (-offset) chars from the end of the string |
length | the number of characters from offset to include. if negative, specifies all but the remaining (-length) characters. |
The requested sub string.
declare function SubStrCompare overload ( byref a as const string, byref b as const string, byval offset as integer = 0 ) as integer
Compares a substring with another.
a | A string. |
b | A string. |
offset | zero-based offset of substring. if negative, specifies (-offset) chars from the end of the string |
Returns a negative, zero or positive value if a is less than, equal to or greater than b, respectively.
declare function SubStrCompare ( byref a as const string, byref b as const string, byval offset as integer, byval length as integer ) as integer
Compares a substring with another.
a | A string. |
b | A string. |
offset | zero-based offset of substring. if negative, specifies (-offset) chars from the end of the string |
length | the number of characters from offset to include. if negative, specifies all but the remaining (-length) characters. |
Returns a negative, zero or positive value if a is less than, equal to or greater than b, respectively.
declare function SubStrCount overload ( byref haystack as const string, byref needle as const string, byval offset as integer = 0 ) as integer
Finds the number of substrings within a string.
haystack | The string to search. |
needle | The substring to search for. |
offset | The zero-based offset into the haystack to start the search. If negative, specifies -offset chars from the end of the haystack. |
The number of times the needle was found in the haystack.
declare function SubStrCount ( byref haystack as const string, byref needle as const string, byval offset as integer, byval length as integer ) as integer
Finds the number of substrings within a portion of a string.
haystack | The string to search. |
needle | The substring to search for. |
offset | The zero-based offset into the haystack to start the search. If negative, specifies -offset chars from the end of the haystack. |
length | The size of the portion of haystack to search. If negative, specifies all but the remaining -length characters. |
The number of times the needle was found in the haystack.
declare sub SubStrReplace overload ( byref subject as string, byref replacement as const string, byval offset as integer = 0 )
Replaces a substring with another.
subject | The string containing the substring to replace. |
replacement | The new substring. |
offset | The zero-based offset of the substring. If negative, specifies -offset chars from the end of the subject string |
declare sub SubStrReplace ( byref subject as string, byref replacement as const string, byval offset as integer, byval length as integer )
Replaces a substring with another.
subject | The string containing the substring to replace. |
replacement | The new substring. |
offset | The zero-based offset of the substring. If negative, specifies -offset chars from the end of the subject string |
length | The number of characters from offset to replace. If negative, specifies all but the remaining -length characters. |
Returns a portion of a string.
declare function SubStr overload ( byref subject as const string, byval offset as integer = 0 ) as string
Compares a substring with another.
declare function SubStrCompare overload ( byref a as const string, byref b as const string, byval offset as integer = 0 ) as integer
Finds the number of substrings within a string.
declare function SubStrCount overload ( byref haystack as const string, byref needle as const string, byval offset as integer = 0 ) as integer
Replaces a substring with another.
declare sub SubStrReplace overload ( byref subject as string, byref replacement as const string, byval offset as integer = 0 )