[Gambas-user] R: How to get all string after last "/"
Fabien Bodard
gambas.fr at ...626...
Fri Aug 23 10:41:07 CEST 2013
2013/8/23 paulwheeler <paulwheeler at ...546...>
>
> Very interesting that g3 treats a web address the same as a file name.
> Definitely easier than my code, and something to remember! Thanks
> Fabien!
> paul
>
> It's not the fact of Gambas ... But a web address look like a file address
on unix.
http://folder/flie.ext
/folder/file.ext
file://folder/file.ext
ftp://folder/file.ext... etc
file.Name
File.BaseName
File.ext
do just the job that the above gb code do ... but more faster.
> On 08/22/2013 01:14 PM, Fabien Bodard wrote:
>
> :-)
>
> StrName = File.Name([1]"http://www.link1.com/folder1/picture1.png")
>
> [2]http://gambasdoc.org/help/comp/gb/file/name?v3
>
>
> 2013/8/22 abbat81 [3]<abbat.81 at ...787...>
>
> Jussi Lahtinen wrote
>
> You can use InStr() to find "png" and count back to "/".
>
> Ok, how to count back to last "/" in string if we have:
>
> Dim s As String = [4]"http://www.link1.com/folder1/folder1/picture1.png"
> Print InStr(s, ".png")
>
> => 46
>
>
>
> --
> View this message in context:
> [5]
> http://gambas.8142.n7.nabble.com/How-to-get-all-string-after-last-tp42952p42
> 961.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
>
>
> ------------------------------------------------------------------------------
> Introducing Performance Central, a new site from SourceForge and
> AppDynamics. Performance Central is your source for news, insights,
> analysis and resources for efficient Application Performance Management.
> Visit us today!
> [6]
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> _______________________________________________
> Gambas-user mailing list
> [7]Gambas-user at lists.sourceforge.net
> [8]https://lists.sourceforge.net/lists/listinfo/gambas-user
>
> References
>
> 1. http://www.link1.com/folder1/picture1.png
> 2. http://gambasdoc.org/help/comp/gb/file/name?v3
> 3. mailto:abbat.81 at ...787...
> 4. http://www.link1.com/folder1/folder1/picture1.png
> 5.
> http://gambas.8142.n7.nabble.com/How-to-get-all-string-after-last-tp42952p42961.html
> 6.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> 7. mailto:Gambas-user at lists.sourceforge.net
> 8. https://lists.sourceforge.net/lists/listinfo/gambas-user
>
> ------------------------------------------------------------------------------
> Introducing Performance Central, a new site from SourceForge and
> AppDynamics. Performance Central is your source for news, insights,
> analysis and resources for efficient Application Performance Management.
> Visit us today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Fabien Bodard
More information about the User
mailing list