String manipulation

TheGerman

Member
Licensed User
Longtime User
Hi

I want to manipulate strings and seeking, therefore, something like Mid$,(Stringname,Start,Number of Characters) - but i did not find it ...
therefore, I started once simple and wants to determine the string length - and there is also an example
StrLength = http://www.b4x.com/help/strlength.htm: Example: Msgbox (StrLength ("Basic4ppc"))
Result: Displays 9 ... but does not work. the Errormessage :
Error description: Undeclared variable 'strlength' is used before it was assigned any value.
The keyword "StrLength" is red. Do i have to include any Libary ?
and should is not need to be: Msgbox (StrLength ("Basic4ppc"),"Titel") ?

Strsplit sure is a good thing (if it is not red any more ;-)
but I want to read without the separators the 5 characters starting on Pos 7
is there an option to do that - similar to the mid$ from earlier times?

I would also like to advise how I can properly look for something very grateful.

Thanks Thomas
 

klaus

Expert
Licensed User
Longtime User
Have a look at String manipulations here.
Or you could also look at margrets' String Functions.

... Example: Msgbox (StrLength ("Basic4ppc"))
What you were looking at is a Basic4PPC function.
Basic4PPC (Basic for Pocket PC) is another product for Windows Mobile devices.

Best regards.
 
Upvote 0

TheGerman

Member
Licensed User
Longtime User
Hello Klaus,

THANK YOU for your reply - that's what I was looking for - but not found.

Maybe it's because I speak only limited English which I find nothing -. And out of desperation I took the mas as appears - and I overlooked it is not for the android version Just because I have such Problreme with English - I have the original (before the Google translator) attached vermutlkich that's understandable.

Even after your tip I admittedly needed some time until I get it working for me. the sample string sample was identical
what I do not smoke ... copierte eist after some time I have noticed that I S.Bas must integrate with and now it works.

Generally I have found something incredible difficulties .. I just do not know how I can look right here. Even if I only have one forum post again soche - I've seen at random before I can not gain. I'll do anything wrong in principle - but I am grateful for any tip ... at the moment I am just looking wiso me the following routine:
Dim m As Map
m.Initialize
m.Put ("switching times (1)," Switching times (N). text)
File.WriteMap (File.DirRootExternal, "Map.csv ', m)
Switching times in the file (1) = "10 \: 15" 'writes - although the text is not a laugh track.
and with File.ReadMap (File.DirRootExternal, "Map.csv", m), it is not written back again simply ???

Best Regards !


the same in german:

Hallo klaus,

DANKE für deine Antwort - genau das habe ich gesucht - aber nicht gefunden.

Vieleicht liegt es ja daran das ich nur schlecht Englisch spreche das ich nichts finde - und aus lauter Verzweiflung nehme ich das mas da auftaucht - und habe übersehen das es nicht für die android Version ist. Gerade weil ich solche Problreme mit Englisch habe - habe ich das Original ( vor dem GoogleÜbersetzer) angehängt das ist vermutlkich verständlicher.

Selbst nach deinem Tip habe ich zugegebenermaßen noch eine Weile gebraucht bis ich es bei mir zum laufen gebracht habe. das Beispiel StringSample lief gleich
was ich mir rauch copierte nicht ... eist nach einiger Zeit habe ich gemerkt das ich die S.Bas mit einbinden muß und jetzt funktioniert es .

Generell habe ich hier unglaublich große Schwierigkeiten etwas zu finden .. ich weiss einfach nicht wie ich hier richtig suchen kann. Selbst wenn ich nur einen Forumsbeitrag noch einmal soche - den ich per Zufall schon einmal gesehen habe finde ich den nicht. irgend etwas mach ich prinzipiell falsch - bin aber für jeden Tipp dankbar ... im Moment suche ich gerade wiso mir folgende Routine :
Dim m As Map
m.Initialize
m.Put("Schaltzeiten(1)",Schaltzeiten(N).Text)
File.WriteMap(File.DirRootExternal,"Map.csv",m)
Im File Schaltzeiten(1)="10\:15" ´schreibt - obwohl im Text kein Backslach ist.
und mit File.ReadMap(File.DirRootExternal,"Map.csv",m) wird es nicht einfach wieder zurückgeschrieben ?


Viele Grüße
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
So sollte es gehen:
B4X:
m = File.ReadMap(File.DirRootExternal,"Map.csv")
Du solltest Dir diesen HelpViewer von agraham oder auch diesen von Vader runterladen.
Diese zeigen alle Funktionen der verschiedenen Libraries an.

Beste Grüsse.
 
Upvote 0

TheGerman

Member
Licensed User
Longtime User
Hi Klaus,

THANK YOU for the tips - I have installed both "search engines"!

But my "true beginner questions" are also there not to find easily.

And becurse it are really trivial questions, I do not want to create always a new thread - would a PM in German Language be OK for you?

Best regards
 
Upvote 0
Top