#34 StringUtils.substr

닫힘
ranides4 년 전을 오픈 · 0개의 코멘트
ranides 코멘트됨, 4 년 전

Make method: substr(begin, length) which accepts negative indexes.

  • negative begin is counted from the end of string.
  • negative length is subtracted from length of string

Two arguments:

  • example: make string a bit shorter: .substr(0, -2)
  • example: extract last 3 characters: .substr(-3, 3)

Short version:

  • example: extract first 3 characters: .substr(3)
  • example: extract last 3 characters: .substr(-3)
Make method: `substr(begin, length)` which accepts negative indexes. - negative `begin` is counted from the end of string. - negative `length` is subtracted from length of string Two arguments: - example: make string a bit shorter: `.substr(0, -2)` - example: extract last 3 characters: `.substr(-3, 3)` Short version: - example: extract first 3 characters: `.substr(3)` - example: extract last 3 characters: `.substr(-3)`
ranides 커밋 4 년 전에서 이 이슈 언급
로그인하여 이 대화에 참여
마일스톤 없음
담당자 없음
참여자 1명
로딩중...
취소
저장
아직 콘텐츠가 없습니다.