Downloads
release
dev builds
extras
themes
Documentation
manual
wiki
device status
Support
forums
mailing lists
IRC
Development
bugs
patches
dev guide
Search
Donate
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Welcome to the Rockbox Technical Forums!
Rockbox Technical Forums
Rockbox Development
Starting Development and Compiling
API: anything to split string into an array exists?
« previous
next »
Print
Pages: [
1
]
Author
Topic: API: anything to split string into an array exists? (Read 1500 times)
Zeltzer
Member
Posts: 6
API: anything to split string into an array exists?
«
on:
February 14, 2010, 02:37:13 PM »
Hello, I need to split a st|ri|ng into an array, are there any custom RB routines that I don't need to rewrite? I honestly looked today through the code, but haven't found yet.
Just don't want to add some unnecessary code.
Logged
funman
Developer
Member
Posts: 645
Re: API: anything to split string into an array exists?
«
Reply #1 on:
February 14, 2010, 04:05:34 PM »
if it isn't in the standard C library it's unlikely
Logged
a wise man said: "a wise man said"
Zeltzer
Member
Posts: 6
Re: API: anything to split string into an array exists?
«
Reply #2 on:
February 14, 2010, 05:14:56 PM »
What I'm looking for is a ready Rockbox function that does that, using ANSI C, of course.
I just don't want to add a new one if it already exists and I simply cannot see it.
Something that reads substring|delimiter|substring sequentially.
«
Last Edit: February 14, 2010, 05:16:54 PM by Zeltzer
»
Logged
Domonoky
Developer
Member
Posts: 205
Re: API: anything to split string into an array exists?
«
Reply #3 on:
February 14, 2010, 05:34:10 PM »
There is no function to split it directly to a array in C or rockboxs plugin api.
But you can easily do this yourself with the strtok_r funktion to seperate the string into tokens and then put those token in a array yourself.
(look at normal C strtok documentation on how to use that).
Logged
Print
Pages: [
1
]
« previous
next »
Rockbox Technical Forums
Rockbox Development
Starting Development and Compiling
API: anything to split string into an array exists?
SMF 2.0.19
|
SMF © 2021
,
Simple Machines
Rockbox Privacy Policy
XHTML
RSS
WAP2
Page created in 0.024 seconds with 16 queries.