Logo
Explore Help
Register Sign In
sadmen
/
jyoung
mirror of https://github.com/jyoung8607/openpilot.git
1
0
Fork
You've already forked jyoung
0
Code Issues Packages Projects Releases Wiki Activity
open source driving agent
3809 Commits
102 Branches
34 Tags
1.6 GiB
Tree: e95d2f7025
jyoung/common/string_helpers.py

7 lines
216 B
Raw Normal View History Unescape Escape

common folder old-commit-hash: e8d888c45b5cb84bf38bdb96cae579a10f7ae281
6 years ago
def replace_right(s, old, new, occurrence):
# replace_right('1232425', '2', ' ', 1) -> '12324 5'
# replace_right('1232425', '2', ' ', 2) -> '123 4 5'
split = s.rsplit(old, occurrence)
Enable more flake8 checks (#1602) * enable some more flake8 checks * some more quick ones * bump opendbc * e401 * e711 e712 * e115 e116 * e222 * e301 * remove that * e129 * e701 e702 * e125 e131 * e227 * e306 * e262 * W503 * e713 * e704 * e731 * bump opendbc * fix some e722 old-commit-hash: d9bf9f0a4036f55411f6dfbb438990a5eb7f4930
5 years ago
return new.join(split)
Powered by Gitea Version: 1.17.1 Page: 73ms Template : 2ms
English
Bahasa Indonesia Deutsch English Español Français Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Српски Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API Website