michael@0: /* michael@0: * Copyright 2013 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: #include "SkString.h" michael@0: #include "SkStringUtils.h" michael@0: michael@0: void SkAddFlagToString(SkString* string, bool flag, const char* flagStr, bool* needSeparator) { michael@0: if (flag) { michael@0: if (*needSeparator) { michael@0: string->append("|"); michael@0: } michael@0: string->append(flagStr); michael@0: *needSeparator = true; michael@0: } michael@0: }