getTitleFromModel method

String getTitleFromModel (
  1. int maxSymbols
)

Gets string to set it as note title

Implementation

String getTitleFromModel(int maxSymbols) {
  List<String> a = content.split("\n");
  return a.first.substring(0, min(a.first.length, maxSymbols));
}