Zitat von
Vienna
Damit könnte man eine Funktionen erstellen welche das Ausschneiden von Texteilen ermöglicht.
Wäre gar nicht so schwer zu erstellen, falls Nokman das wirklich so benötigt.
Die Funktionen gibt es teilweise schon, sogar in A3 default, einfach im Funktionsbrowser rumkramen !
z.B.:
Code:
/*
Author: Jiri Wainar
Description:
Get a substring out of the string.
Parameter(s):
1: STRING - source string
2: NUMBER (optional, default 0) - start index;
* indexing starts at 0
3: NUMBER (optional, default end of string) - end index
* negative number means -X chars from the string end
Returns:
STRING
*/
Code:
/*
Author: Karel Moricky
Description:
Split spring according to given separators
Parameter(s):
1: STRING - affected string
2: STRING - one or more separators
Returns:
ARRAY of STRINGs
*/
Code:
/*
File: inString.sqf
Author: Mika Hannola
Description:
Find a string within a string.
Parameter(s):
_this select 0: <string> string to be found
_this select 1: <string> string to search from
_this select 2 (Optional): <boolean> search is case sensitive (default: false)
Returns:
Boolean (true when string is found).
How to use:
_found = ["string", "String", true] call BIS_fnc_inString;
*/