1
title = title.replace(':AppName', App.name)
title = title.replace(':AppLogo', App.logo)
title = title.replace(':boardName', page.data.board.name)
title = title.replace(':articleTitle', page.data.article.title)
title = title.replace(':articleAuthor', page.data.article.author)
title = ...

I have to replace the long title several times. Depending on the page, because the structure of the title changes, the key of the object may be repeated or not exist.

Do you have any good ideas besides using 'try catch'?

이장희
  • 101
  • 6

0 Answers0