J
Joshua Muheim
Hi all
I'm looking for the coolest way to get the substring
/Webwork/pgbookings
out of
/Users/Josh/Webwork/pgbookings
The part /Users/Josh is saved in the variable my_var.
In PHP I would do something like the following:
substr(/Users/Josh/Webwork/pgbookings, strlen(my_var)) # =>
/Webwork/pgbookings
What's the fastest way to do this in Ruby?
Josh
I'm looking for the coolest way to get the substring
/Webwork/pgbookings
out of
/Users/Josh/Webwork/pgbookings
The part /Users/Josh is saved in the variable my_var.
In PHP I would do something like the following:
substr(/Users/Josh/Webwork/pgbookings, strlen(my_var)) # =>
/Webwork/pgbookings
What's the fastest way to do this in Ruby?
Josh