Edit File by line
•
/
home
/
barbar84
/
public_h...
/
wp-conte...
/
plugins
/
sujqvwi
/
AnonR
/
anonr.TX...
/
opt
/
alt
/
ruby27
/
share
/
ruby
/
csv
•
File:
delete_suffix.rb
# frozen_string_literal: true
[
0
]
Fix
|
Delete
[
1
]
Fix
|
Delete
# This provides String#delete_suffix? for Ruby 2.4.
[
2
]
Fix
|
Delete
unless String.method_defined?(:delete_suffix)
[
3
]
Fix
|
Delete
class CSV
[
4
]
Fix
|
Delete
module DeleteSuffix
[
5
]
Fix
|
Delete
refine String do
[
6
]
Fix
|
Delete
def delete_suffix(suffix)
[
7
]
Fix
|
Delete
if end_with?(suffix)
[
8
]
Fix
|
Delete
self[0...-suffix.size]
[
9
]
Fix
|
Delete
else
[
10
]
Fix
|
Delete
self
[
11
]
Fix
|
Delete
end
[
12
]
Fix
|
Delete
end
[
13
]
Fix
|
Delete
end
[
14
]
Fix
|
Delete
end
[
15
]
Fix
|
Delete
end
[
16
]
Fix
|
Delete
end
[
17
]
Fix
|
Delete
[
18
]
Fix
|
Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function
Edit text
Download
Information
Rename
Copy
Move
Delete
Chmod
List